Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetFlagsFromEnv ¶
SetFlagsFromEnv parses all registered flags in the given flagset, and if they are not already set it attempts to set their values from environment variables. Environment variables take the name of the flag but are UPPERCASE, and any dashes are replaced by underscores. Environment variables additionally are prefixed by the given string followed by and underscore. For example, if prefix=PREFIX: some-flag => PREFIX_SOME_FLAG
Types ¶
type IPv4Flag ¶
type IPv4Flag struct {
// contains filtered or unexported fields
}
IPv4Flag parses a string into a net.IP after asserting that it is an IPv4 address. This type implements the flag.Value interface.
type StringSliceFlag ¶
type StringSliceFlag []string
StringSliceFlag parses a comma-delimited list of strings into a []string. This type implements the flag.Value interface.
func (*StringSliceFlag) Set ¶
func (ss *StringSliceFlag) Set(v string) error
func (*StringSliceFlag) String ¶
func (ss *StringSliceFlag) String() string