Documentation ¶
Overview ¶
Package envflag provides a wrapper around the standard flag package that can fall back to environment variables
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Bool ¶
Bool defines a bool flag with specified name, default value, and usage string. If an environment variable with the same name as the flag is set, it will be used instead of the default value. The return value is the address of a bool variable that stores the value of the flag.
func Int ¶
Int defines an int flag with specified name, default value, and usage string. If an environment variable with the same name as the flag is set, it will be used instead of the default value. The return value is the address of an int variable that stores the value of the flag.
func Parse ¶
func Parse()
Parse parses the command-line flags from os.Args[1:]. Must be called after all flags are defined and before flags are accessed by the program.
Types ¶
This section is empty.