3.5 KiB
3.5 KiB
Changelog
All notable changes to go-config are documented here.
The format is based on Keep a Changelog
and this project adheres to Semantic Versioning.
0.2.1 (2026-05-02)
Bug Fixes
- add motivation config precedence regression test (d44b568)
- ci: make lint and windows tests reliable (a6a51ec)
- ci: pin lint toolchain to Go 1.26 (26aa513)
- ci: unblock release and cross-platform test pipeline (76b4f49)
- ci: use golangci-lint v2 config format (cb0ee8a)
Code Refactoring
- move testfixtures to internal package and update imports (eadcf9f)
Documentation
- enhance release flow documentation and add version command to CLI (0ae52ef)
[Unreleased]
[0.2.0] - 2026-05-02
Added
- Module rename to
github.com/eslider/go-configwith subpackagesenv,yaml,json,ini. - Uniform
CodecAPI:New,Map,Unmarshal,UnmarshalContext,Marshal,WriteTo. internal/sourcefor bytes, readers, files, and HTTP(S) URLs with optional headers and customhttp.Client.internal/keymaprecursive key walk with defaultLowerAlnumnormalizer.internal/mergedeep merge: recursive maps, last-write-wins scalars, configurable slice replace vs concat.internal/structconvaroundgithub.com/go-viper/mapstructure/v2.- CLI
envc(cmd/envc):convert,get,merge. - Fixtures under
fixtures/for identity, merge, edge, and invalid parser cases. testfixtureshelper for tests.- Repo-local ASRs in
docs/asr/.
Changed
- Breaking: the v0.1.0
github.com/eslider/go-envAPI (Unmarshal,UnmarshalPrefix,AsMap, …) is not re-exported; useenv.New(...).Unmarshal(...).
Dependencies
github.com/go-viper/mapstructure/v2,github.com/joho/godotenv,gopkg.in/yaml.v3,gopkg.in/ini.v1.
[0.1.0] - 2026-04-24
Initial release as github.com/eslider/go-env. Extracted from produktor.io/ai-fabric/pkg/env per
inventar/docs/asr/ASR-0008-ai-fabric-audit.md.
Added
Unmarshal(dst, opts...)— decode all process env vars into a Go struct.UnmarshalPrefix(dst, prefix, opts...)— prefix-scoped variant that strips the prefix before building the path.AsMap()/AsMapPrefix(prefix)— escape hatch returning the nestedmap[string]anybuilt fromos.Environ().- Options:
WithTrim,WithWeaklyTyped,WithTagName,WithDecodeHook. - TrimSpace on string values is enabled by default; disable with
WithTrim(false). - Error wrapping with
%won both decoder configuration and decode failures — matchesmarkets-platform/TP-general-code/pkg/systembehaviour, improves on the original ai-fabric version.
Tests
- 15 pure-Go unit tests. No mocks.
asMapFromEnvironis tested with syntheticenvironslices (not a mock — a pure input). Follows the eSlidergo-*no-synthetic-mocks policy.