Registry / config / kelseyhightower-envconfig

kelseyhightower-envconfig

JSON →
library1.4.0gogounverified

Decodes environment variables into Go structs based on user-defined specifications.

go get github.com/kelseyhightower/envconfig
INSTALL
IMPORT
SIG · KELSEYHIGHTOWER-EN
K
kelseyhightower-envconfig
configgov1.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.

envconfig
github.com/kelseyhightower/envconfig

Processes environment variables into a struct configuration.

package main import ( "fmt" "github.com/kelseyhightower/envconfig" ) type Config struct { Port int `envconfig:"PORT" default:"8080"` } func main() { var cfg Config envconfig.Process("myapp", &cfg) fmt.Printf("Port: %d\n", cfg.Port) }
Debug
Known issues

No known issues recorded.

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

No dependency data recorded yet.

Agent activity
34 hits · last 30 days
node
32
Resources
kelseyhightower-envconfig — go get kelseyhightower-envconfig · libregistry