Registry / config / sethvargo-go-envconfig

sethvargo-go-envconfig

JSON →
library1.3.0gogounverified

Package envconfig populates struct fields based on environment variable values (or anything that responds to 'Lookup').

configutility
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.

github.com/sethvargo/go-envconfig

Populate a struct from environment variables with defaults.

package main import ( "context" "fmt" "github.com/sethvargo/go-envconfig" ) type Config struct { Port int `env:"PORT, default=8080"` } func main() { var c Config ctx := context.Background() if err := envconfig.Process(ctx, &c); err != nil { panic(err) } fmt.Printf("Port: %d\n", c.Port) }
Debug
Known footguns

No known footguns recorded.

Upgrade
Version history

Breaking-change detection hasn't run for this library yet.

Audit
Security & dependencies

CVE tracking and dependency tree are planned for a later release.

Agent activity
39 hits · last 30 days
petalbot
5
bytedance
4
gptbot
3
amazonbot
3
claudebot
3
mj12bot
1
Resources