Documentation ¶
Overview ¶
Package environment allow environment variables to be obtained from either the environment or the command line. Environment variables are always uppercase, with the Prefix; flags are always lowercase without.
Index ¶
Constants ¶
View Source
const Prefix = "DOCUMIZE"
Prefix provides the prefix for all Environment variables
Variables ¶
This section is empty.
Functions ¶
func GetString ¶
GetString sets-up the flag for later use, it must be called before ParseOK(), usually in an init().
func Parse ¶
func Parse(doFirst string)
Parse calls flag.Parse() then checks that the required environment variables are all set. It should be the first thing called by any main() that uses this library. If all the required variables are not present, it prints an error and calls os.Exit(2) like flag.Parse().
Types ¶
Click to show internal directories.
Click to hide internal directories.