Registry / config / env
library0.5.1gogounverified

Maps environment variables to struct fields and vice versa, with support for custom sources.

go get go.deanishe.net/env
INSTALL
IMPORT
SIG · ENV
E
env
configgov0.5.1
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
go.deanishe.net/env

Bind environment variables to a struct.

package main import ( "fmt" "go.deanishe.net/env" ) type Config struct { Port int `env:"PORT"` Host string `env:"HOST"` } func main() { var cfg Config env.Bind(&cfg) fmt.Printf("Port: %d, Host: %s\n", cfg.Port, cfg.Host) }
Debug
Known issues

No known issues recorded.

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

No dependency data recorded yet.

Agent activity
36 hits · last 30 days
node
34
Resources
env — go get env · libregistry