Files
go-config/CHANGELOG.md
eSliderandGitHub 3aa0524f29
Lint / Lint (push) Successful in 57s
Release Please / Release Please (push) Failing after 2s
Tests / Test (Go 1.22 / ubuntu-latest) (push) Successful in 52s
Tests / Test (Go 1.23 / ubuntu-latest) (push) Successful in 28s
Tests / Test (Go stable / ubuntu-latest) (push) Successful in 38s
Release / GoReleaser (push) Failing after 6s
Tests / Test (Go stable / macos-latest) (push) Canceled after 0s
Tests / Test (Go stable / windows-latest) (push) Canceled after 0s
chore(main): release 0.4.0 (#11)
2026-05-12 14:01:52 +01:00

5.1 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.4.0 (2026-05-12)

Features

  • env: add nestedUnderJQPath for extracting nested subtrees by jq-style paths (719fccf)
  • envc: add support for converting current process environment to YAML (b7709d6)

Bug Fixes

  • test: rename Url field to URL to satisfy revive var-naming (c06f7f2)

0.3.0 (2026-05-03)

Features

  • add TOML codec and envc format support (474cd88)
  • envc: improve root help and add stdin hang repro script (2d674de)

Documentation

  • add CONTRIBUTING guide and expand README (36f0ed9)
  • refactor envc README and centralize decisions (2d7b97f)

0.2.2 (2026-05-02)

Bug Fixes

  • release: shrink Linux envc binaries with UPX (9c2021c)

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-config with subpackages env, yaml, json, ini.
  • Uniform Codec API: New, Map, Unmarshal, UnmarshalContext, Marshal, WriteTo.
  • internal/source for bytes, readers, files, and HTTP(S) URLs with optional headers and custom http.Client.
  • internal/keymap recursive key walk with default LowerAlnum normalizer.
  • internal/merge deep merge: recursive maps, last-write-wins scalars, configurable slice replace vs concat.
  • internal/structconv around github.com/go-viper/mapstructure/v2.
  • CLI envc (cmd/envc): convert, get, merge.
  • Fixtures under fixtures/ for identity, merge, edge, and invalid parser cases.
  • testfixtures helper for tests.
  • Repo-local ASRs in docs/asr/.

Changed

  • Breaking: the v0.1.0 github.com/eslider/go-env API (Unmarshal, UnmarshalPrefix, AsMap, …) is not re-exported; use env.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 nested map[string]any built from os.Environ().
  • Options: WithTrim, WithWeaklyTyped, WithTagName, WithDecodeHook.
  • TrimSpace on string values is enabled by default; disable with WithTrim(false).
  • Error wrapping with %w on both decoder configuration and decode failures — matches markets-platform/TP-general-code/pkg/system behaviour, improves on the original ai-fabric version.

Tests

  • 15 pure-Go unit tests. No mocks. asMapFromEnviron is tested with synthetic environ slices (not a mock — a pure input). Follows the eSlider go-* no-synthetic-mocks policy.