Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type EnvFlagSet ¶
type EnvFlagSet struct { // FlagSet defines flag.FlagSet to operate on. If not provided, flag.CommandLine will be used. FlagSet *flag.FlagSet // Prefix defines environment variable prefix to use Prefix string // MinLength defines minimal flag name length to use in mapping. MinLength int // Map defines custom flag name to environment variable mappings. Prefix or MinLength are not taken into account. Map map[string]string // UpdateUsage switches environment variable names in usage message. UpdateUsage bool // Env defines environment lookup method. If not defined, syscall environment lookup will be used which is probably // the best option for the majority of use cases. Env EnvGetter // contains filtered or unexported fields }
EnvFlagSet represents a envflag object that contains several settings.
func (*EnvFlagSet) Parse ¶
func (ef *EnvFlagSet) Parse(arguments []string) error
Parse parses flag definitions from env and the argument list.
func (*EnvFlagSet) Process ¶
func (ef *EnvFlagSet) Process() error
Process updates FlagSet with values from the environment. NOTICE: flag.Parse() will not be called by this function.
Click to show internal directories.
Click to hide internal directories.