Registry / config / caarlos0-env-v7

caarlos0-env-v7

JSON →
library7.1.0gogounverified

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

go get github.com/caarlos0/env/v7
INSTALL
IMPORT
SIG · CAARLOS0-ENV-V7
C
caarlos0-env-v7
configgov7.1.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/v7

Parses environment variables into a struct.

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

No known issues recorded.

Upgrade
Version history
7.1.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-v7 — go get caarlos0-env-v7 · libregistry