github.com/shaj13/env (go): Package env implements environment variables parsing.  Define env using env.String(), Bool(), Int(), etc.  This declares an integer env, N, stored in the pointer nEnv, with type *int:  If you like, you can bind the env to a variable using the Var() functions.  Or you can create custom envs that satisfy the Value interface (with pointer receivers) and couple them to env parsing by  For such envs, the default value is just the initial value of the variable.  After all envs are defined, call  to parse the environment variables into the defined envs.  Envs may then be used directly. If you're using the envs themselves, they are all pointers; if you bind to variables, they're values.  Integer envs accept 1234, 0664, 0x1234 and may be negative. Boolean envs may be:  Duration envs accept any input valid for time.ParseDuration.  The default set of environment variables (environ) is controlled by top-level functions. The EnvSet type allows one to define independent sets of envs. The methods of EnvSet are analogous to the top-level functions for environ set.
Keywords: config|configuration|environment|environment-variables|go|golang|hacktoberfest