Closed edev0 closed 4 years ago
Thanks for this great library !
This PR automatically adds environment variable names to each flag's usage text.
For example, a definition such as:
var ( port = fs.Int("port", 8080, "listen port for server") debug = fs.Bool("debug", false, "log debug information") ) ff.Parse(fs, os.Args[1:], ff.WithEnvVarNoPrefix())
would result in the following usage text:
Usage of myservice: -debug log debug information (also via env var DEBUG) -port int listen port for server (also via env var PORT) (default 8080)
Also fixed some small typos.
Sorry, I don't want this package to mutate the provided FlagSet.
Understood, thanks !
Thanks for this great library !
This PR automatically adds environment variable names to each flag's usage text.
For example, a definition such as:
would result in the following usage text:
Also fixed some small typos.