envvars

command
v1.11.26 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 20, 2023 License: MIT Imports: 6 Imported by: 0

README

envvars

To bind one or more envvars (OS Environment Variables) to a flag, use .EnvKeys(k1,k2,...):

	cmdr.NewFloat64(3.14159265358979323846264338327950288419716939937510582097494459230781640628620899).
		Titles("float64", "f64").
		Description("A float64 flag with a `PI` value", "").
		Group("2000.Float").
		EnvKeys("PI").
		AttachTo(parent)

Now test it with the following commands:

PI=3.1 go run ./examples/envvars/ f ~~debug|grep 'app\.flags\.float64'
PI=3.2 go run ./examples/envvars/ f ~~debug|grep 'app\.flags\.float64'

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL