All notable changes to this project will be documented in this file. This project adheres to Semantic Versioning.
- Added new ReplaceArrValues Option to replace arrays and merge maps. #193
- Added new parse.Config flag to disable using commas to imply arrays. #192
- The parse.NoopConfig disables using commas to imply arrays by default. #192
- Fixed panic on zero Value while processing a collection of interfaces. #159
- Preserve empty arrays when reifying #188
- Added ability to adjust merging behavior based on field names in configuration. Using
ucfg.FieldMergeValues
,ucfg.FieldReplaceValues
,ucfg.FieldAppendValues
, anducfg.FieldPrependValues
. #151
- Fixed nonzero validator to not fail on nil array or slice. #147
- Fixed nonzero validator to validate maps.
- Fixed required validator to validate maps.
- Prevent Validate from being called when value is a pointer or interface and is nil. #144
- Add support for HJSON. #131
- Add new parse.Config to adjust parsing of varibles returned by a Resolve. #139
- Add call to InitDefaults when map, primitives, or structs implement Initializer interface during Unpack. #104
- Moved internal/parse to parse module. #139
- Add parse.Config to resolvers return. #139
- Call Validate on custom slice types. #133
- Call Validate on custom map types. #136
- Disabled object parsing of environment variables. #139
- Apply validation to defaults passed into Unpack when Config doesn't contain a value. #42
- Add (*Config).Has. #127
- Add (*Config).Remove. #126
- Remove CI and support for go versions <1.10. #128
- Added a NOOP Resolver that will return the key wrapped in the field reference syntax. #122
- Do not treat $ as escape char in plain strings/regexes #120
- Remove UUID lib and use pseudo-random IDs instead. #118
- New UUID lib: github.com/gofrs/uuid. #116
- Fix escape character not removed from escaped string #115
- Ignore flag keys with missing values. #111
- Add *Config merging options merge, append, prepend, replace. #107
- Fix: do not treat ucfg.Config (or castable type) as Unpacker. #106
- Fix: an issue with the Cyclic reference algorithm when a direct reference was pointing to another reference. #100
- Detect cyclic reference and allow to search top level key with the other resolvers. #97
- Allow to diff keys of two different configuration #93
- Introduce ,ignore struct tag option to optionally ignore exported fields. #89
- Add support for custom Unpacker method with
*Config
being convertible to first parameter. The custom method must be compatible toConfigUnpacker
. #90
- Ignore private struct fields when merging a struct into a config. #89
- merging sub-configs enforces strict variable expansion #85
- fix merging nil sub-configs #85
- Add support for pure array config files #82
- Invalid top-level types return non-critical error (no stack-trace) on merge #82
- Fix panic when merging or creating a config from nil interface value #82
- Add per element type stop set for handling unquoted strings (reduces need for quoting strings in environment variables) #80
- fix issue unpacking array from environment variable into struct array fields #80
- fix unparsed values being used for unpacking #80
- Treat
,
character as only special character in non quoted top-level strings. #78
- Fix parsing empty string or nil objects from environment variables. #76
- Syntax for passing lists and dictionaries to flags. #72
- Add Unpacker interface specializations for primitive types. #73
- Variable expansion parsing lists and dictionaries with parser introduced in #72. #74
- Fix Unpacker interface not applied if some 'old' value is already present on target and is struct implementing Unpack. #73
- Fix int/uint to float type conversation. #68
- Fix primitive type unpacking for variables expanded from environment variables or strings read/created by config file parsers. #67
- Fix duplicate key error when normalizing tables. #63
- Fix merging array values. #59
- Fix initializing empty array values. #58
- Fix error message if Unpack returns error. #56
- Fix
(*FlagValue).String
panic with go 1.7 #54
- Turn '$' into universal escape character, so '}' in default values can be escaped with '$'. #52
- Fix parsing ':' in expansion default value. #51, #52
- Add
(*Config).IsArray
and(*Config).IsDict
. #44
- Fix (*Config).CountField returning 1 for arrays of any size. #43
- Fix unpacking into slice/array top-level or if
inline
-tag is used. #45
- Added CLI flag support. #15
- Added variable expansion support. #14
- Report error message from regexp.Compile if compilation fails #21
- Nil values become merge-able with concrete types. #26
- Fix merging types
time.Duration
and*regexp.Regexp
. #25 - Fix Validate-method not being run for structs. #32
- Fix field validation errors on structs fields does not contain missing or failed configuration variable. #31
- Report error message from regexp.Compile if compilation fails #21
- Handle empty slices, strings, regular expression by nonzero,required validation tags #20, #23
- Support for validation via Validator interface. #16
- Added direct support for uint values. #8, #16
- Support for simple validators via struct tags (e.g. min, max, nonzero, required). #16
- Add support for validating time.Duration. #9, #16
- Added Unpacker interface for customer unpackers. #17
- Support for numeric indices for accessing/writing array elements. #12 #19
- Set/Get methods require index of -1 if value is not supposed to be in an array. #19
- Configurations can be arrays and/or objects at the same time. #19
- Access elements with empty path and index in array based Configuration nodes. #19
- Check for integer overflow when unpacking into int/uint. #8, #16
- Fixed unpacking *regexp.Regexp
- Fixed unpacking empty config as *Config object
- add support for unpacking *regexp.Regexp via regexp.Compile
- Parse time.Duration from int/float values in seconds
- Improve error messages
- Add options and PathSep support to low level option setters/getters
- Added support for rebranding
*ucfg.Config
viatype MyConfig ucfg.Config
using casts between pointer types in Unpack and Merge. - Introduced CHANGELOG.md for documenting changes to ucfg.