Skip to content

Releases

v2.2.10

Choose a tag to compare

@github-actions github-actions released this 06 Nov 15:14

Change Log

Refactor

  • refactor(config): run every data write under the data lock with its hook 1b04e49
  • refactor(read): name the slice-elem helper parseEnvString and document the contract c0ce4bb
  • refactor(read): walk the key path with maputil instead of a local copy 3fb41ba

Feature

  • feat(read): support array index path in Get, eg. parent.child[1] (#231) 87302e0

Fixed

  • fix(read): prevent panic on negative slice index in a key path (#221) c3e2b83
  • fix(export): return errors from configuration writes (#224) 621a487
  • fix(read): preserve the int64 range on 32-bit systems (#228) 46aa059
  • fix(read): bound check the int/uint conversion on 32-bit 226ec71
  • fix(read): parse the Uint value with the platform uint width 87608e8
  • fix: release the config lock before invoking set hooks (#225) e63f2c7
  • fix(config): keep the config data stable while a hook is running df5f568
  • fix: clear read caches when setting config values (#229) c4d38e6
  • fix: expand environment variables in string slices (#230) e7757e6
  • fix(read): parse env in StringMap for map[string]string values (#232) 4fdbc1c
  • fix(read): don't return the clamped value for an out of range int64 c9b0427
  • fix(read): parse env in Ints and IntMap before the conversion 5e44dc9
  • fix(read): reset the out of range float value like the int readers 1ab6cc9

Other

  • ci: run the unit tests with the race detector 994c46b
  • build(deps): bump github.com/gookit/goutil from 0.8.0 to 0.8.3 (#227) c947083
  • test: migrate the deprecated testutil/assert import to x/assert c272cf7
  • chore(config): drop the unused defaultValueTag const 3aaaf6c
  • test: cover the multi index path in the array index test 7ad4d86
  • test(read): pin the StringMap env contract for the cache and LoadData paths 629f1a1
  • build(deps): bump github.com/gookit/goutil from 0.8.3 to 0.8.4 (#234) 1200b6b
  • Lock configuration inspection reads during data replacement (#235) 88a1c0b
  • chore(deps): drop the stale go.sum entries of the old goutil version cb9a1db
  • Parse negative duration values during struct decoding (#236) 54bb633
  • Initialize the root map when writing after nil SetData (#237) d711809
  • chore(deps): upgrade github.com/gookit/ini/v2 to v2.3.3 32b93c0
  • test(config): dump TestIssues_59 into a temp dir 80e06d8

v2.2.9

Choose a tag to compare

@github-actions github-actions released this 04 Jul 04:50

Change Log

Fixed

  • fix(read): Duration() parses Go duration strings (e.g. "300s", "1h30m") (#218) 94aa2e8
  • fix(reload): reset data before reloading files 6a3fe04

Other

  • build(deps): bump github.com/gookit/goutil from 0.7.5 to 0.7.6 (#215) fc79c1b
  • build(deps): bump WillAbides/setup-go-faster from 1.15.0 to 1.19.0 (#214) c345d01
  • build(deps): bump actions/checkout from 6 to 7 (#216) e4ef650
  • build(deps): bump github.com/gookit/goutil from 0.7.6 to 0.8.0 (#217) 99340a5
  • docs(watch): debounce reload example 78c5e7e
  • ci: update ci testing go version 0edfefc

v2.2.8

Choose a tag to compare

@github-actions github-actions released this 05 May 02:29

Change Log

Fixed

  • fix parsing of zero duration with units (#202) 5b631cd

Feature

  • feat(load): 添加按过滤器加载配置文件和环境变量的功能 50bd1c0

Update

  • 👔 up: update go min version to go 1.21 e6a2a31

Other

  • Add Copilot coding agent instructions for efficient repository onboarding (#200) bfea38f
  • build(deps): bump github/codeql-action from 3 to 4 (#203) 1a9afda
  • build(deps): bump actions/checkout from 5 to 6 (#204) e4bef93
  • build(deps): bump WillAbides/setup-go-faster from 1.14.0 to 1.15.0 (#205) e3919e3
  • Fixed panic and bugs in Exists()/GetValue() (#206) d3d8407
  • build(deps): bump softprops/action-gh-release from 2 to 3 (#207) fa9ac8d
  • build(deps): bump github.com/gookit/goutil from 0.7.1 to 0.7.4 (#210) 9328cee
  • build(deps): bump github.com/go-viper/mapstructure/v2 from 2.4.0 to 2.5.0 (#208) e1e1679
  • build(deps): bump github.com/goccy/go-json from 0.10.5 to 0.10.6 (#212) d63dc85
  • build(deps): bump github.com/goccy/go-yaml from 1.18.0 to 1.19.2 (#209) 4fd1616
  • build(deps): bump github.com/BurntSushi/toml from 1.5.0 to 1.6.0 (#211) 67d37cd
  • ci: Add stable Go matrix entry and update checks 81efee0
  • chore: 更新依赖和文档,调整.gitignore ef32aad

v2.2.7

Choose a tag to compare

@github-actions github-actions released this 15 Aug 06:32

Change Log

Feature

  • ✨ feat: add ParseTime string support on parse struct default value ab1ba0b

Update

  • 🔥 up: Removed the built-in HCL format configuration resolution adbcebd

Other

  • ✅ test: add a test case for issues #194, update some docs 80a4a39
  • ⬆️ dep: replace package mitchellh/mapstructure to go-viper/mapstructure/v2 0c0186e
  • ⬆️ dep: upgrade github_actions checkout to v5 84b8347
  • ⬆️ dep: upgrade gookit/ini, gookit/properties to latest version c340d75

v2.2.6

Choose a tag to compare

@github-actions github-actions released this 10 Apr 05:24

Change Log

Feature

  • ✨ feat: add new func NewGeneric for quick create a generic config f2bee83

Update

  • ✨ up: LoadFlags - modify some logic for parse flag desc a8b2565

Other

  • build(deps): bump WillAbides/setup-go-faster from 1.13.0 to 1.14.0 (#184) 3fcf1a0
  • add custom flag desc support (#186) 8d76a1d
  • build(deps): bump softprops/action-gh-release from 1 to 2 (#188) b8d62ce
  • 👷 ci: add run unit test on go>1.21 674390c
  • 📝 doc: update readme docs bb04daa
  • 📝 doc: update readme docs for load flags, env 4849c4d
  • ⬆️ dep: upgrade some dep to new version 633df19
  • ✅ test: add more error case for load and export config e926d34
  • 💚 ci: fix the TestConfig_DumpToFile error on go1.19 a691331

New Contributors

Full Changelog: v2.2.5...v2.2.6

v2.2.5

Choose a tag to compare

@github-actions github-actions released this 13 Jan 04:13

Change Log

Feature

  • ✨ feat: LoadFromDir support new option: DataKey. see issues #173 1e610d7
  • ✨ feat: add new Option: MergeOptions support set the data merge options. see #166 00de7f6

Update

  • 👔 up: update the dep gookit/goutil to v0.6.15 e25815d
  • 👔 up: update the dep imdario/mergo to dario.cat/mergo v1.0.0 b624f19

Other

  • build(deps): bump github.com/hashicorp/hcl/v2 from 2.18.1 to 2.19.0 (#174) c4df552
  • build(deps): bump morphy2k/revive-action from 2.5.3 to 2.5.4 (#176) 4196bd6
  • build(deps): bump github.com/hashicorp/hcl/v2 from 2.19.0 to 2.19.1 (#175) 830e161
  • build(deps): bump WillAbides/setup-go-faster from 1.12.0 to 1.13.0 (#180) 8ff0379
  • build(deps): bump github/codeql-action from 2 to 3 (#181) 6622e55
  • build(deps): bump morphy2k/revive-action from 2.5.4 to 2.5.5 (#182) 7f31649
  • build(deps): bump morphy2k/revive-action from 2.5.5 to 2.5.6 (#183) c74c0ae
  • 📝 doc: update ZH-CN readme and update gh action config 25dc0fa
  • 💚 ci: fix a syntax error on lint.yml 39cb17c
  • ✅ test: add more unit tests, improve test coverage 1a3e1b1
  • 💚 ci: fix morphy/revive-action:v2.5.5 not found on lint.yml d2b8e48
  • 💚 ci: fix go-version or go-version-file must be specified on lint.yml 6c11936

v2.2.4

Choose a tag to compare

@github-actions github-actions released this 16 Oct 06:40

Change Log

Fixed

  • fix: parsing struct with duration like 90s (#151) 340d324
  • 🐛 fix: bind struct - if c.data is nil, directly return. see #162 2d6eb56
  • 🐛 fix: init default value will skip for empty []struct field. see #162 d1e31aa

Feature

  • ✨ feat: parse env var support required checking. see #156 c58859d

Other

  • build(deps): bump github.com/gookit/goutil from 0.6.10 to 0.6.11 (#153) 526ed31
  • build(deps): bump github.com/gookit/goutil from 0.6.11 to 0.6.12 (#154) ba68e03
  • build(deps): bump WillAbides/setup-go-faster from 1.8.0 to 1.9.0 (#158) 3572fbe
  • build(deps): bump WillAbides/setup-go-faster from 1.9.0 to 1.9.1 (#159) 969f1cf
  • build(deps): bump WillAbides/setup-go-faster from 1.9.1 to 1.10.0 (#160) 2961f10
  • build(deps): bump morphy2k/revive-action from 2.5.2 to 2.5.3 (#163) 2f679d7
  • build(deps): bump github.com/hashicorp/hcl/v2 from 2.17.0 to 2.18.0 (#164) eaf2585
  • build(deps): bump WillAbides/setup-go-faster from 1.10.0 to 1.10.1 (#161) d1853fa
  • build(deps): bump actions/checkout from 3 to 4 (#165) df4a629
  • build(deps): bump github.com/goccy/go-yaml from 1.11.0 to 1.11.1 (#168) ce66cbd
  • build(deps): bump WillAbides/setup-go-faster from 1.10.1 to 1.11.0 (#167) 2eceba0
  • build(deps): bump github.com/goccy/go-yaml from 1.11.1 to 1.11.2 (#169) 27558e8
  • build(deps): bump WillAbides/setup-go-faster from 1.11.0 to 1.12.0 (#170) abe21b0
  • build(deps): bump github.com/hashicorp/hcl/v2 from 2.18.0 to 2.18.1 (#171) 49ece93
  • ⬆️ dep: upgrade test on go1.21 and remove test on go1.18 a6380a3

v2.2.3

Choose a tag to compare

@github-actions github-actions released this 20 Jun 16:38

Change Log

  • 👔 up: update the banding struct and init defaults logic ecb0bbe

v2.2.2

Choose a tag to compare

@github-actions github-actions released this 11 Jun 15:54

Change Log

Feature

  • ✨ feat: add new method LoadSMap() for load string-map data 460f558
  • ✨ feat: support init default on struct-slice field. resolve issues #141 099297b
  • ✨ feat: support set driver name aliases for resolve issues #139 15d9de4

Update

  • 👔 up: replace json5 pkg from yosuke-furukawa/json5 to titanous/json5 7388b26

Other

  • build(deps): bump github.com/gookit/goutil from 0.6.6 to 0.6.7 (#127) 6c47acf
  • build(deps): bump github.com/hashicorp/hcl/v2 from 2.16.1 to 2.16.2 (#128) eedd3c2
  • build(deps): bump github.com/goccy/go-json from 0.10.0 to 0.10.1 (#129) 598881e
  • build(deps): bump morphy2k/revive-action from 2.4.1 to 2.5.0 (#130) 0b8d656
  • build(deps): bump github.com/imdario/mergo from 0.3.13 to 0.3.14 (#131) 365c527
  • build(deps): bump morphy2k/revive-action from 2.5.0 to 2.5.1 (#132) e109354
  • 🎨 chore: update some comments for json5 package 5836243
  • build(deps): bump github.com/goccy/go-json from 0.10.1 to 0.10.2 (#133) 4af11e6
  • build(deps): bump github.com/imdario/mergo from 0.3.14 to 0.3.15 (#134) 906fbff
  • build(deps): bump github.com/goccy/go-yaml from 1.10.0 to 1.10.1 (#135) 34bc67a
  • build(deps): bump github.com/goccy/go-yaml from 1.10.1 to 1.11.0 (#138) f755a87
  • build(deps): bump github.com/gookit/ini/v2 from 2.2.1 to 2.2.2 (#136) 5e9058f
  • build(deps): bump github.com/gookit/goutil from 0.6.7 to 0.6.8 (#137) 37b156f
  • build(deps): bump morphy2k/revive-action from 2.5.1 to 2.5.2 (#142) 6cddaa2
  • build(deps): bump github.com/hashicorp/hcl/v2 from 2.16.2 to 2.17.0 (#145) 8cc28fa
  • Fix ParseTime and ParseEnv interaction (#147) 3f23d7b
  • build(deps): bump github.com/BurntSushi/toml from 1.2.1 to 1.3.1 (#148) 91943c5
  • build(deps): bump github.com/BurntSushi/toml from 1.3.1 to 1.3.2 (#149) 1e5875e
  • ✅ test: fix unit test error on update deps version 2dd5341
  • ⬆️ dep: update the gookit/goutil to v0.6.9 d9cbc9b

New Contributors

Full Changelog: v2.2.1...v2.2.2

v2.2.1

Choose a tag to compare

@github-actions github-actions released this 05 Mar 15:59
6216690

Change Log

Update

  • update goutils to v.0.6.6 and fix problem due to a breaking change (#126) 6216690

Other

  • build(deps): bump github.com/hashicorp/hcl/v2 from 2.16.0 to 2.16.1 95f53fc
  • build(deps): bump github.com/gookit/properties from 0.2.1 to 0.3.0 e30a229
  • build(deps): bump github.com/goccy/go-yaml from 1.9.8 to 1.10.0 (#125) 7198ea9

New Contributors

Full Changelog: v2.2.0...v2.2.1