Repository navigation
v0.2.0
v0.2.0
New Features
Processfunction — map.envvariables directly into a struct using struct tags (envconfig,split_words,required,default,ignored). Supportsstring,int,uint,float, andboolfield types.- Optional filepath on
LoadEnvandProcess— both functions now accept an optional filepath argument. When omitted,.envis loaded by default, removing the need to passnilor a pointer.
Breaking Changes
LoadEnvsignature changed:LoadEnv(filepath *string, verbose bool)→LoadEnv(filepath ...string)Processsignature changed:Process(s any, filepath *string)→Process(s any, filepath ...string)- The
verboseparameter has been removed fromLoadEnv
Performance Improvements
- Parallel env loading for files with 50+ variables — chunks are distributed across workers sized to available CPUs
- Memory improvements to env file parsing (pre-allocated slices, zero-copy byte scanning)
Bug Fixes
- Duplicate key handling: last occurrence now consistently wins
- Fixed concurrency issues related to env file size thresholds
Other
- Added
Makefilewithtestandbuildtargets - Added CI via GitHub Actions
go fixapplied across codebase- Updated README with full API reference and struct tag documentation
Migration: Replace
goenv.LoadEnv(&file, false)withgoenv.LoadEnv(file), andgoenv.Process(&cfg, nil)withgoenv.Process(&cfg).