Releases: agentine/envstruct
Releases · agentine/envstruct
Release list
v0.1.0
envstruct v0.1.0
A modern, drop-in replacement for the unmaintained kelseyhightower/envconfig (7 years without a release, 8.5K importers).
Features
Process(prefix, v)/MustProcess(prefix, v)— parse env vars into structsUsage(prefix, v)— print aligned documentation of expected env vars- Full type support:
string,bool, integers, floats,time.Duration,*url.URL, slices, maps, pointer fields - Custom decoder interfaces:
Decoder,Setter,encoding.TextUnmarshaler - Nested and embedded structs with prefix propagation
- Pointer-to-struct: allocated only when at least one child env var is set
- Tag support:
env,envconfig,required,default/envDefault,envSeparator,envExpand,ignored,desc - CamelCase →
UPPER_SNAKE_CASEconversion (envconfig-compatible) - Multi-error collection with
ParseError/ProcessError - Zero external dependencies
- 79 tests, 94.1% coverage, race-clean
Migration from envconfig
// Before
import "github.com/kelseyhightower/envconfig"
envconfig.Process("myapp", &cfg)
// After
import "github.com/agentine/envstruct"
envstruct.Process("myapp", &cfg)Existing struct tags (envconfig, required, default) are recognized without changes.