Skip to content

refactor: make command accessible in option parser #1301

Closed

Description

@qweeah

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.

Activity

  1. added this to the future milestone on Mar 21, 2024
  2. added
    triage
    on Mar 26, 2024
  3. added
    enhancement
    and removed
    triage
    on Mar 26, 2024
  4. qweeah commented on Mar 28, 2024

    @qweeah
    ContributorAuthor

    @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

Metadata

Metadata

Labels

enhancement

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions