Registry / config / ardanlabs-conf-v3

ardanlabs-conf-v3

JSON →
library3.12.0gogounverified

Package conf provides support for using environmental variables and command line arguments for configuration.

go get github.com/ardanlabs/conf/v3
INSTALL
IMPORT
SIG · ARDANLABS-CONF-V3
A
ardanlabs-conf-v3
configgov3.12.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.

conf
github.com/ardanlabs/conf/v3

Parse configuration from environment variables and flags.

package main import ( "fmt" "github.com/ardanlabs/conf/v3" "os" ) func main() { cfg := struct { Port int `conf:"default:8080"` }{} helper, err := conf.Parse("APP", &cfg) if err != nil { fmt.Println(err) os.Exit(1) } fmt.Println(cfg.Port) _ = helper }
Debug
Known issues
breakingv3 has breaking changes from v2, including tag format and API.
fix
Use v3 import path and updated struct tags.
affects: >=3.0.0
Upgrade
Version history
3.12.0latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
32 hits · last 30 days
node
28
Resources
ardanlabs-conf-v3 — go get ardanlabs-conf-v3 · libregistry