Registry / config / caarlos0-env

caarlos0-env

JSON →
library3.5.0+incompatiblegogounverified

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

go get github.com/caarlos0/env
INSTALL
IMPORT
SIG · CAARLOS0-ENV
C
caarlos0-env
configgov3.5.0+incompatible
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

Parse environment variables into a struct.

package main import ( "fmt" "github.com/caarlos0/env" ) type Config struct { Port int `env:"PORT" envDefault:"3000"` } func main() { var cfg Config env.Parse(&cfg) fmt.Println(cfg.Port) }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
3.5.0+incompatiblelatest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

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