Documentation ¶
Index ¶
- func HandleAttributeFlags(c *base.Command, suffix, fullField string, ...) error
- func HelpMap(resType string) map[string]func() string
- func PopulateCombinedSliceFlagValue(input CombinedSliceFlagValuePopulationInput)
- func PopulateCommonFlags(c *base.Command, f *base.FlagSet, resourceType string, ...)
- func SynopsisFunc(inFunc, resType string) string
- type CombinedSliceFlagValuePopulationInput
- type Option
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HandleAttributeFlags ¶ added in v0.7.0
func HandleAttributeFlags(c *base.Command, suffix, fullField string, sepFields []base.CombinedSliceFlagValue, defaultFunc func(), setFunc func(map[string]any)) error
HandleAttributeFlags takes in a command and a func to call for default (that is, set to nil) and non-default values. Suffix can be used to allow this logic to be used for various needs, e.g. -attr vs -secret.
func PopulateCombinedSliceFlagValue ¶ added in v0.12.0
func PopulateCombinedSliceFlagValue(input CombinedSliceFlagValuePopulationInput)
func PopulateCommonFlags ¶
func SynopsisFunc ¶
Types ¶
type CombinedSliceFlagValuePopulationInput ¶ added in v0.12.0
type CombinedSliceFlagValuePopulationInput struct { // FlagSet is the flag set to add vars to FlagSet *base.FlagSet // FlagNames is the set of flag names FlagNames []string // FullPopulationFlag is the string var to set if a fully-specified map is // supplied, e.g. "attributes" FullPopulationFlag *string // FullPopulationInputName is the name of the flag when setting a // fully-specified map; also used for generating help texts FullPopulationInputName string // PiecewisePopulationFlag is the var that is built up via the combination // method, e.g. "attr", "string-attr", etc. PiecewisePopulationFlag *[]base.CombinedSliceFlagValue // PiecewisePopulationInputName is the base name of the flag when using the // combination method, e.g. "attr" will be used to build "string-attr"; also // used for generating help texts PiecewisePopulationInputBaseName string // If ProtoCompat is true, the key will be validated against proto3 syntax // requirements for identifiers. If the string is split via KeyDelimiter, each // segment will be evaluated independently. PiecewiseNoProtoCompat bool }
type Option ¶ added in v0.12.0
Option - how Options are passed as arguments.
func WithSkipScopeIdFlag ¶ added in v0.12.0
WithSkipScopeIdFlag tells a command to not create a scope ID flag (usually because it's already been defined)
Click to show internal directories.
Click to hide internal directories.