Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In command's Validate I cannot access top-level configuration/flags #340

Open
mitar opened this issue Oct 28, 2022 · 0 comments
Open

In command's Validate I cannot access top-level configuration/flags #340

mitar opened this issue Oct 28, 2022 · 0 comments

Comments

@mitar
Copy link
Contributor

mitar commented Oct 28, 2022

I have a bit of a chicken and egg problem. In top-level Validate I cannot know which command user has selected. And if I put Validate on the command struct, then I cannot access top-level configuration/flags. Maybe Validate should get kong.Context as a parameter?

mitar added a commit to peer/db that referenced this issue Oct 29, 2022
It is also checked in ServeCommand.

See: alecthomas/kong#340
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant