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, have the given prefix and any dashes are replaced by underscores - for example: some-flag => PREFIX_SOME_FLAG
Types ¶
type DeprecatedFlag ¶
type DeprecatedFlag struct {
Name string
}
DeprecatedFlag encapsulates a flag that may have been previously valid but is now deprecated. If a DeprecatedFlag is set, an error occurs.
type IgnoredFlag ¶
type IgnoredFlag struct {
Name string
}
IgnoredFlag encapsulates a flag that may have been previously valid but is now ignored. If an IgnoredFlag is set, a warning is printed and operation continues.
func (*IgnoredFlag) IsBoolFlag ¶
func (f *IgnoredFlag) IsBoolFlag() bool
IsBoolFlag is defined to allow the flag to be defined without an argument