github.com/bitnami-labs/pflagenv (go): Package pflagenv implements a simple way to expose all your pflag flags as environmental variables.  Commandline flags have more precedence over environment variables. In order to use it just call pflagenv.SetFlagsFromEnv from an init function or from your main.  You can call it either before or after your your flag.Parse invocation.  This example will make it possible to set the default of --my_flag also via the MY_PROG_MY_FLAG env var:
Keywords: cli|go|golang