Repository navigation
v0.2.5
Bug-fix release (PR #23): edge-case values that previously produced silent wrong values, errors, or panics.
Fixes
intfields no longer accept duration syntax (e.g.10sused to silently set the value to 1e10 nanoseconds); onlytime.Durationfields are parsed as durationsint/uint/floatfields and pointers are parsed with their bit size, so out-of-range values error out instead of being silently truncated (e.g.int8field with1000used to become-24)[]int64with duration-like values and[]time.Durationwith plain numbers no longer panic inreflect.Value.Set*[]Tpointer-to-slice fields now parse correctly (previously failed with "field is not addressable")- environment values now overwrite non-nil pointer fields, matching the documented behavior
parseScientificrejects negative exponents (e.g.1e-3used to silently become1) and handles comma+exponent combos like1,000e3Parse(&c)wherecis already a pointer no longer panics; nil or non-struct configs return an error instead of panicking,Listreturns an empty list
Tests
- All existing tests pass; 13 regression tests added in
bugfix_test.go