Registry / config / peterbourgon-ff-v3

peterbourgon-ff-v3

JSON →
library3.4.0gogounverified

Package ff is a flags-first helper package for configuring programs from commandline flags, environment variables, and config files.

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

Parse flags with environment variable fallback.

package main import ( "flag" "github.com/peterbourgon/ff/v3" ) func main() { fs := flag.NewFlagSet("example", flag.ExitOnError) var port int fs.IntVar(&port, "port", 8080, "listen port") ff.Parse(fs, os.Args[1:], ff.WithEnvVarPrefix("MYAPP")) }
Debug
Known issues
breakingVersion 3 has breaking API changes from v2; import path uses /v3.
fix
Use import path github.com/peterbourgon/ff/v3 and update code accordingly.
affects: >=3.0.0
Upgrade
Version history
3.4.0latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
30 hits · last 30 days
node
28
Resources
peterbourgon-ff-v3 — go get peterbourgon-ff-v3 · libregistry