GitShow/kelseyhightower/envconfig
kelseyhightower

envconfig

Golang library for managing configuration data from environment variables

by kelseyhightower
Star on GitHubFork

Go

5.5k stars397 forks51 contributorsQuiet · 1y agoSince 2013v1.4.0MIT

Meet the team

See all 51 on GitHub →
kelseyhightower
kelseyhightower34 contributions
teepark
teepark26 contributions
dan9186
dan91867 contributions
andrei-m
andrei-m4 contributions
dbainbri-ciena
dbainbri-ciena4 contributions
mark-adams
mark-adams4 contributions
FranGM
FranGM3 contributions
AlekSi
AlekSi2 contributions

Languages

View on GitHub →
Go100%

Commit activity

Last 12 weeks · 0 commits

Full graph →

Community health

2 of 6 standards met

Community profile →
42
✓README✓License○Contributing○Code of Conduct○Issue Template○PR Template

Recent PRs & issues

Quiet · Last activity 1y ago
See all on GitHub →
jaideeppyne
Initialize nil pointers before UnmarshalTextOpenPR

Summary invoked (and Decode/Set) on nil pointer values. Slice elements such as and unset fields therefore panicked: Nil pointers are now allocated before those methods run, matching the existing allocation that already happened later for non-interface pointer fields. Fixes #157 Test covers a slice and a nil field whose implements . It panicked before this change.

jaideeppyne · 1w ago
team-humaki
envconfig: optional nested separator for env keysOpenPR

Fixes #223 Nested structs currently join prefix and field names with , so under becomes . That collides with and with tools that treat as the hierarchy break. takes . Empty keeps . reads without changing .

team-humaki · 1w ago
team-humaki
map: keep colons in valuesOpenPR

Split map pairs on the first colon only so values like URLs parse. Fixes #180

team-humaki · 1w ago

Recent fixes

View closed PRs →
sonnemusk
Support _FILE convention for secretsMergedPR

Closes #130 Summary Adds built-in support for the Docker/Kubernetes secrets convention. When an environment variable is unset or empty, envconfig also looks for a companion variable with a suffix (e.g. ). If set, that value is treated as a filesystem path; the file contents are read and used as the configuration value after trailing newlines are trimmed. Non-empty environment variables take precedence over Missing/unreadable files return an error is satisfied when the value comes from a file treats known companions as allowed Existing / API is unchanged (always-on, no new options) This differs from #210, which only exposes a custom hook for applications to implement themselves. Built-in support matches the convention used by Postgres, Redis, and similar images and what was requested in #130. Example Test plan [x] Unit tests with temp files covering: basic read and trailing newline trim env takes precedence over empty env falls back to required field via missing file error alt () name with default when neither env nor file is set allows [x] Full suite:

sonnemusk · 1mo ago
sonnemusk
fix: allow colons in envconfig map valuesMergedPR

Summary Map env values are split on every , so entries like failed with . Use so only the first colon separates key and value. Test plan [x] [x] full package tests

sonnemusk · 2mo ago
sonnemusk
docs: fix Setter godoc grammar and comment typoMergedPR

Summary Small documentation cleanups: Setter interface comment: "types can" → "types that can" usage template test comment: "lieteral" → "literal" Test plan [x]

sonnemusk · 2mo ago
Structured data for AI agents

Repository: kelseyhightower/envconfig. Description: Golang library for managing configuration data from environment variables Stars: 5467, Forks: 397. Primary language: Go. Languages: Go (100%). License: MIT. Latest release: v1.4.0 (7y ago). Open PRs: 35, open issues: 27. Last activity: 1y ago. Community health: 42%. Top contributors: kelseyhightower, teepark, dan9186, andrei-m, dbainbri-ciena, mark-adams, FranGM, AlekSi, aybabtme, relistan and others.

·@ofershap

Replace github.com with gitshow.dev