Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RepeatedStringFlag ¶
RepeatedStringFlag is a cli.Flag for repeatable string values that does NOT split on commas. Each Apply creates a fresh StringSlice to prevent cross-run accumulation when the flag is defined as a package-level var.
func (*RepeatedStringFlag) Apply ¶
func (f *RepeatedStringFlag) Apply(set *goflag.FlagSet) error
Apply registers a fresh StringSlice with the flag set on every call, preventing cross-run accumulation when the flag is a package-level var.
func (*RepeatedStringFlag) IsSet ¶
func (f *RepeatedStringFlag) IsSet() bool
IsSet always returns false; c.IsSet() uses fs.Visit which is the authoritative check for whether the flag appeared on the command line.
func (*RepeatedStringFlag) Names ¶
func (f *RepeatedStringFlag) Names() []string
func (*RepeatedStringFlag) String ¶
func (f *RepeatedStringFlag) String() string
type StringMap ¶
func (*StringMap) Set ¶
Set resets the map before parsing. This is intentional: StringMap is used as a GenericFlag.Value on package-level vars; without a reset, values from a previous app.Run() call accumulate into the next parse. The reset also makes Set idempotent when urfave/cli's normalizeFlags copies the flag value to aliases via Set(String()) — see String() below.
func (*StringMap) String ¶
String returns the map in key1=v1,key2=v2 format so that it round-trips cleanly through Set. urfave/cli's normalizeFlags propagates a flag's value to its aliases by calling Set(String()), so returning the Go default map representation (map[k:v]) would cause Set to fail and wipe the map.
type StringSlice ¶
type StringSlice []string
func (*StringSlice) Set ¶
func (s *StringSlice) Set(value string) error
func (*StringSlice) String ¶
func (s *StringSlice) String() string
func (*StringSlice) Value ¶
func (s *StringSlice) Value() []string