Registry / config / caarlos0-env-v9

caarlos0-env-v9

JSON →
library9.0.0gogounverified

Package env provides a simple way to parse environment variables into Go structs.

go get github.com/caarlos0/env/v9
INSTALL
IMPORT
SIG · CAARLOS0-ENV-V9
C
caarlos0-env-v9
configgov9.0.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.

env
github.com/caarlos0/env/v9

Parses environment variables into a struct with default values.

package main import ( "fmt" "github.com/caarlos0/env/v9" ) type Config struct { Port int `env:"PORT" envDefault:"8080"` Host string `env:"HOST" envDefault:"localhost"` } func main() { var cfg Config env.Parse(&cfg) fmt.Printf("%+v\n", cfg) }
Debug
Known issues

No known issues recorded.

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

No dependency data recorded yet.

Agent activity
35 hits · last 30 days
node
30
OpenAI (training)
1
Resources
caarlos0-env-v9 — go get caarlos0-env-v9 · libregistry