Registry / cli / peterbourgon-ff-v2

peterbourgon-ff-v2

JSON →
library2.0.1gogounverified

Flags-first package for Go command-line argument parsing with support for environment variables and config files.

go get github.com/peterbourgon/ff/v2
INSTALL
IMPORT
SIG · PETERBOURGON-FF-V2
P
peterbourgon-ff-v2
cligov2.0.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

ff
github.com/peterbourgon/ff/v2

Parses flags with environment variable support.

package main import ( "flag" "fmt" "github.com/peterbourgon/ff/v2" ) func main() { fs := flag.NewFlagSet("example", flag.ExitOnError) var name string fs.StringVar(&name, "name", "world", "a name") ff.Parse(fs, os.Args[1:], ff.WithEnvVarPrefix("MYAPP")) fmt.Printf("Hello, %s!\n", name) }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
2.0.1latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
27 hits · last 30 days
node
24
Amazon
1
Resources