Documentation
¶
Index ¶
- func BoolEnvVar(b *bool, flagName, envVariable string, defaultValue bool, description string)
- func BoolVar(b *bool, flagName string, defaultValue bool, description string)
- func DurationEnvVar(d *time.Duration, flagName, envVariable string, defaultValue time.Duration, ...)
- func DurationVar(d *time.Duration, flagName string, defaultValue time.Duration, ...)
- func InitFlagSet()
- func IntEnvVar(i *int, flagName, envVariable string, defaultValue int, description string)
- func IntVar(i *int, flagName string, defaultValue int, description string)
- func MarkDeprecated(name string, usageMessage string) error
- func Parse() error
- func StringArrayVar(s *[]string, flagName string, defaultValue []string, description string)
- func StringEnvVar(s *string, flagName, envVariable, defaultValue, description string)
- func StringSliceEnvVar(s *[]string, flagName, envVariable string, defaultValue []string, ...)
- func StringVar(s *string, flagName, defaultValue, description string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BoolEnvVar ¶
BoolEnvVar creates bool flag with given parameters. If flag is not provided, it will try to get env variable.
func DurationEnvVar ¶
func DurationEnvVar(d *time.Duration, flagName, envVariable string, defaultValue time.Duration, description string)
DurationEnvVar creates time.Duration flag with given parameters. If flag is not provided, it will try to get env variable.
func DurationVar ¶
DurationVar creates a time.Duration flag with given parameters.
func InitFlagSet ¶
func InitFlagSet()
func IntEnvVar ¶
IntEnvVar creates int flag with given parameters. If flag is not provided, it will try to get env variable.
func MarkDeprecated ¶
MarkDeprecated indicates that a flag is deprecated
func StringArrayVar ¶
StringArrayVar creates string flag with given parameters. Flag can be used multiple times.
func StringEnvVar ¶
StringEnvVar creates string flag with given parameters. If flag is not provided, it will try to get env variable.
func StringSliceEnvVar ¶
func StringSliceEnvVar(s *[]string, flagName, envVariable string, defaultValue []string, description string)
StringSliceEnvVar creates a string slice flag with the given parameters. If the flag is not provided, it will try to get the env variable. Flag accepts multiple values separated by commas.
Types ¶
This section is empty.