Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PrintGlobalSpec ¶
func PrintGlobalSpec()
PrintGlobalSpec prints all environment variables for the program in lexicographically ascending order and returns.
func RegisterSpec ¶
func RegisterSpec(s ...Spec)
RegisterSpec registers one or more environment variable specifications in the global specification.
Types ¶
type Spec ¶
type Spec []Var
Spec contains all environment variables that a component requires.
func GlobalSpec ¶
func GlobalSpec() Spec
GlobalSpec is the global specification of all environment variables.
func (Spec) Resolve ¶
Resolve retrieves all environment variables required in the specification. If any required environment variable is not found it is added to the list of errors which is returned after all environment variables have been checked. If an environment variable is not specified by the user, the default value will be used (specified in `Value`). If this is not specified either, an empty string is used and an error will be returned for the empty environment variable if it is required.