Registry / config / mstoykov-envconfig

mstoykov-envconfig

JSON →
library1.5.0gogounverified

Decodes environment variables into Go structs based on user-defined specifications, useful for configuration management.

go get github.com/mstoykov/envconfig
INSTALL
IMPORT
SIG · MSTOYKOV-ENVCONFIG
M
mstoykov-envconfig
configgov1.5.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/mstoykov/envconfig

Load configuration from environment variables

package main import ( "fmt" "github.com/mstoykov/envconfig" ) type Config struct { Port int `env:"PORT" default:"8080"` } func main() { var cfg Config err := envconfig.Init(&cfg) if err != nil { panic(err) } fmt.Println(cfg.Port) }
Debug
Known issues

No known issues recorded.

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

No dependency data recorded yet.

Agent activity
21 hits · last 30 days
node
18
Resources
mstoykov-envconfig — go get mstoykov-envconfig · libregistry