Registry / cli / peterbourgon-ff

peterbourgon-ff

JSON →
library1.7.1gogounverified

Package ff provides a simple, composable flag parsing library for Go.

go get github.com/peterbourgon/ff
INSTALL
IMPORT
SIG · PETERBOURGON-FF
P
peterbourgon-ff
cligov1.7.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

Parse flags with environment variable support

package main import ( "flag" "github.com/peterbourgon/ff" ) func main() { fs := flag.NewFlagSet("example", flag.ExitOnError) var name string fs.StringVar(&name, "name", "world", "a name to greet") 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
1.7.1latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
32 hits · last 30 days
node
28
OpenAI (training)
1
Resources
peterbourgon-ff — go get peterbourgon-ff · libregistry