Registry / config / joeshaw-envdecode

joeshaw-envdecode

JSON →
library0.0.0-20200121155833-099f1fc765bdgogounverified

A Go package for populating struct fields from environment variables using struct tags.

go get github.com/joeshaw/envdecode
INSTALL
IMPORT
SIG · JOESHAW-ENVDECODE
J
joeshaw-envdecode
configgov0.0.0-20200121155833-099f1fc765bd
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.

envdecode
github.com/joeshaw/envdecode

Decode environment variables into a struct

package main import ( "fmt" "github.com/joeshaw/envdecode" ) type Config struct { Port int `env:"PORT,default=8080"` } func main() { var cfg Config envdecode.Decode(&cfg) fmt.Println(cfg.Port) }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.0.0-20200121155833-099f1fc765bdlatest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
36 hits · last 30 days
node
34
Amazon
1
OpenAI (training)
1
Resources
joeshaw-envdecode — go get joeshaw-envdecode · libregistry