Documentation
¶
Index ¶
- func LowerValue(name string, allowed []string, defaultValue string) pflag.Value
- func MustBool(flagSet *pflag.FlagSet, name string) bool
- func MustInt(flagSet *pflag.FlagSet, name string) int
- func MustString(flagSet *pflag.FlagSet, name string) string
- func NormalizedValue(name string, allowed []string, defaultValue string) pflag.Value
- func UpperValue(name string, allowed []string, defaultValue string) pflag.Value
- func Value(name string, allowed []string, defaultValue string) pflag.Value
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LowerValue ¶
LowerValue returns a pflag.Value interface with that will only accept values from a given list, but before checking the allowed list it will normalized values to lower-case.
func MustBool ¶
MustBool returns the bool value of a flag with the given name, it will panic if the flag does not exists or is not the desired type.
func MustInt ¶
MustInt returns the int value of a flag with the given name, it will panic if the flag does not exists or is not the desired type.
func MustString ¶
MustString returns the string value of a flag with the given name, it will panic if the flag does not exists or is not the desired type.
func NormalizedValue ¶
NormalizedValue returns a pflag.Value interface with that will only accept values from a given list, but before checking the allowed list it will normalized values to upper-case and remove any dash or hyphens.
func UpperValue ¶
UpperValue returns a pflag.Value interface with that will only accept values from a given list, but before checking the allowed list it will normalized values to upper-case.
Types ¶
This section is empty.