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

refactor: make command accessible in option parser #1301

Closed
qweeah opened this issue Mar 21, 2024 · 1 comment · Fixed by #1315
Closed

refactor: make command accessible in option parser #1301

qweeah opened this issue Mar 21, 2024 · 1 comment · Fixed by #1315
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@qweeah
Copy link
Contributor

qweeah commented Mar 21, 2024

Currently options are parsed without any argument

// FlagParser parses flags in an option.
type FlagParser interface {
Parse() error
}

All option parser implementations are called in command.PreRunE, where command is actually accessible. Should pass the command to parser to facilitate cmd-specific parsing, e.g. processing the flag set.

@qweeah qweeah added this to the future milestone Mar 21, 2024
@qweeah qweeah added the triage New issues or PRs to be acknowledged by maintainers label Mar 26, 2024
@shizhMSFT shizhMSFT added enhancement New feature or request and removed triage New issues or PRs to be acknowledged by maintainers labels Mar 26, 2024
@qweeah
Copy link
Contributor Author

qweeah commented Mar 28, 2024

@wangxiaoxuan273 Can you resolve this first since it will simplify change in #1294

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants