GitShow/kelseyhightower/envconfig
kelseyhightower

envconfig

Golang library for managing configuration data from environment variables

by kelseyhightower
Star on GitHubFork

Go

5.5k stars393 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 →
johanperez-super
Fix split_words to respect Go naming conventions for plural acronymsOpenPR

Summary required only one lowercase char after the uppercase letter in the second group, causing plural acronyms like or to split incorrectly (e.g. → + → ) Changed to so the second group must have 2+ lowercase chars, preserving plural acronyms as a single token Acronym+word combos like or still split correctly since their second group has multiple lowercase chars Example Before: required After: requires ✓ Test plan [x] Added split_words:"true"\`SpecificationENV_CONFIG_MULTI_WORD_IDS_WITH_AUTO_SPLITdefault_table.txtdefault_list.txtcustom.txtfault.txtgo test ./...`)

johanperez-super · 5mo ago
jgiles
Add support for fields with Set(value T).OpenPR

This is most useful for generic "wrapper" types that add behavior to a contained value. These kinds of wrappers can be useful for configuration values: A wrapper for sensitive values with protections against printing or logging. A wrapper integrating with a scheme for dynamic configuration changes. The desirable behavior for a wrapper containing a value of type T is for the envconfig facilities to apply for decoding the contained value. Achieving this behavior today requires duplicating much of the logic in in a custom method on the wrapper, in order to handle all the various types of values that might be contained. Instead, this commit introduces support for arbitrary Set(value T) methods by first decoding into a new T and then calling the Set method.

jgiles · 10mo 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 · 1h 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 · 2w 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 · 2w ago
Structured data for AI agents

Repository: kelseyhightower/envconfig. Description: Golang library for managing configuration data from environment variables Stars: 5460, Forks: 393. Primary language: Go. Languages: Go (100%). License: MIT. Latest release: v1.4.0 (7y ago). Open PRs: 30, 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