Skip to content

Commit

Permalink
approve v3 docs changes
Browse files Browse the repository at this point in the history
  • Loading branch information
joshfrench committed Feb 12, 2024
1 parent fcfd5b3 commit a366d0b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions testdata/godoc-v3.x.txt
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,9 @@ func (s *BoolWithInverseFlag) Value() bool
type CategorizableFlag interface {
// Returns the category of the flag
GetCategory() string

// Sets the category of the flag
SetCategory(string)
}
CategorizableFlag is an interface that allows us to potentially use a flag
in a categorized representation.
Expand Down Expand Up @@ -702,6 +705,8 @@ func (f *FlagBase[T, C, V]) Names() []string
func (f *FlagBase[T, C, V]) RunAction(ctx context.Context, cmd *Command) error
RunAction executes flag action if set

func (f *FlagBase[T, C, V]) SetCategory(c string)

func (f *FlagBase[T, C, V]) String() string
String returns a readable representation of this value (for usage defaults)

Expand Down Expand Up @@ -821,6 +826,9 @@ type MutuallyExclusiveFlags struct {

// whether this group is required
Required bool

// Category to apply to all flags within group
Category string
}
MutuallyExclusiveFlags defines a mutually exclusive flag group Multiple
option paths can be provided out of which only one can be defined on cmdline
Expand Down

0 comments on commit a366d0b

Please sign in to comment.