Documentation ¶
Index ¶
- func InitFlags()
- func WarnWordSepNormalizeFunc(f *pflag.FlagSet, name string) pflag.NormalizedName
- func WordSepNormalizeFunc(f *pflag.FlagSet, name string) pflag.NormalizedName
- type ColonSeparatedMultimapStringString
- type ConfigurationMap
- type MapStringBool
- type NamedCertKey
- type NamedCertKeyArray
- type StringFlag
- type Tristate
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WarnWordSepNormalizeFunc ¶
func WarnWordSepNormalizeFunc(f *pflag.FlagSet, name string) pflag.NormalizedName
WarnWordSepNormalizeFunc changes and warns for flags that contain "_" separators
func WordSepNormalizeFunc ¶
func WordSepNormalizeFunc(f *pflag.FlagSet, name string) pflag.NormalizedName
WordSepNormalizeFunc changes all flags that contain "_" separators
Types ¶
type ColonSeparatedMultimapStringString ¶ added in v1.9.0
ColonSeparatedMultimapStringString supports setting a map[string][]string from an encoding that separates keys from values with ':' and separates key-value pairs with ','. A key can be repeated multiple times, in which case the values are appended to a slice of strings associated with that key. Items in the list associated with a given key will appear in the order provided. For example: `a:hello,b:again,c:world,b:beautiful` results in `{"a": ["hello"], "b": ["again", "beautiful"], "c": ["world"]}`
func (ColonSeparatedMultimapStringString) Set ¶ added in v1.9.0
func (m ColonSeparatedMultimapStringString) Set(value string) error
Set implements github.com/spf13/pflag.Value
func (ColonSeparatedMultimapStringString) String ¶ added in v1.9.0
func (m ColonSeparatedMultimapStringString) String() string
String implements github.com/spf13/pflag.Value
func (ColonSeparatedMultimapStringString) Type ¶ added in v1.9.0
func (m ColonSeparatedMultimapStringString) Type() string
Type implements github.com/spf13/pflag.Value
type ConfigurationMap ¶
func (*ConfigurationMap) Set ¶
func (m *ConfigurationMap) Set(value string) error
func (*ConfigurationMap) String ¶
func (m *ConfigurationMap) String() string
func (*ConfigurationMap) Type ¶
func (*ConfigurationMap) Type() string
type MapStringBool ¶ added in v1.9.0
func (MapStringBool) Set ¶ added in v1.9.0
func (m MapStringBool) Set(value string) error
Set implements github.com/spf13/pflag.Value
func (MapStringBool) String ¶ added in v1.9.0
func (m MapStringBool) String() string
String implements github.com/spf13/pflag.Value
func (MapStringBool) Type ¶ added in v1.9.0
func (MapStringBool) Type() string
Type implements github.com/spf13/pflag.Value
type NamedCertKey ¶
NamedCertKey is a flag value parsing "certfile,keyfile" and "certfile,keyfile:name,name,name".
func (*NamedCertKey) Set ¶
func (nkc *NamedCertKey) Set(value string) error
func (*NamedCertKey) String ¶
func (nkc *NamedCertKey) String() string
func (*NamedCertKey) Type ¶
func (*NamedCertKey) Type() string
type NamedCertKeyArray ¶
type NamedCertKeyArray struct {
// contains filtered or unexported fields
}
NamedCertKeyArray is a flag value parsing NamedCertKeys, each passed with its own flag instance (in contrast to comma separated slices).
func NewNamedCertKeyArray ¶
func NewNamedCertKeyArray(p *[]NamedCertKey) *NamedCertKeyArray
NewNamedKeyCertArray creates a new NamedCertKeyArray with the internal value pointing to p.
func (*NamedCertKeyArray) Set ¶
func (a *NamedCertKeyArray) Set(val string) error
func (*NamedCertKeyArray) String ¶
func (a *NamedCertKeyArray) String() string
func (*NamedCertKeyArray) Type ¶
func (a *NamedCertKeyArray) Type() string
type StringFlag ¶
type StringFlag struct {
// contains filtered or unexported fields
}
StringFlag is a string flag compatible with flags and pflags that keeps track of whether it had a value supplied or not.
func NewStringFlag ¶
func NewStringFlag(defaultVal string) StringFlag
func (*StringFlag) Default ¶
func (f *StringFlag) Default(value string)
func (StringFlag) Provided ¶
func (f StringFlag) Provided() bool
func (*StringFlag) Set ¶
func (f *StringFlag) Set(value string) error
func (StringFlag) String ¶
func (f StringFlag) String() string
func (*StringFlag) Type ¶
func (f *StringFlag) Type() string
func (StringFlag) Value ¶
func (f StringFlag) Value() string