Releases: qdm12/gosettings
Releases · qdm12/gosettings
v0.4.4
v0.4.4-rc1
Fixes
validate
: linux only: handle permission denied on ip_unprivileged_port_start and return start port 1024 in that case
v0.4.3
v0.4.2
v0.4.1
v0.4.0
Breaking changes
reader
andinternal/parse
packages which replace previoussources/env
andsources/merge
packages- Reader reads from multiple sources in order for each call
- By default, the reader uses the flags source then the environment variable source
internal/parse
contains only pure functions to make full use of Go 1.18+ generics- Update all code comments, merge example and readme document
- Merge functions in merge.go removed (now unneeded due to
reader
package handling the merging) - Override:
OverrideWithComparable
function, replacingOverrideWithNumber
,OverrideWithString
,OverrideWithPointerRaw
,OverrideWithInterface
andOverrideWithSliceRaw
- Defaults:
DefaultComparable
function, replacingDefaultNumber
,DefaultString
,DefaultPointerRaw
,DefaultInterface
andDefaultSliceRaw
Number
constraint andconstraints.go
file removed (no longer needed)
Features
reader/sources/env
environment variable reader-compatible sourcereader/sources/flags
CLI flags reader-compatible sourcereader
package (previouslysources/env
):- add
DefaultOptions
setting to apply to each read - add
FirstKeySet
method - add
CSVNetipAddresses
method - add
NetipPrefix
method - add
NetipAddrPort
method - add
CSVNetipAddrPorts
method - add builtin types methods:
Int8
,Int16
,Int32
,Int64
,Int8Ptr
,Int16Ptr
,Int32Ptr
,Int64Ptr
,Float32
,Float32Ptr
andFloat64Ptr
- add
Fixes
validate
: allow empty listening addressesvalidate
: listening port validation- Check non root users against unprivileged start port found from Kernel file on Linux
- Check if the running program has the net_bind_service capability if trying to listen on a privileged port without root or windows
internal/parse
(previously withinsources/env/parse.go
):- try parsing the empty string if
AllowEmpty(true)
option is specified
- try parsing the empty string if
reader
andinternal/parse
(previouslysources/env
):BoolPtr
returnsnil
when the empty string is found
Documentation
- Update readme and examples with the new usage to merge settings from different sources
- Review code comments
- fix godoc comments bullet list formatting
- fix godoc comments new lines formatting
- mention default settings for CSV methods
- mention nil slices conditions for CSV methods
- change function comment
the error context
toits message
- fix
CSVNetipPrefixes
method comment - review
AcceptEmpty
option comment
Maintenance
- Upgrade Go from 1.20 to 1.21
- Upgrade dependency
golang.org/x/exp
- Upgrade CI Docker image Alpine from 3.16 to 3.18
- Upgrade actions/checkout from 3 to 4 (#12)
- Bump github/codeql-action from 2 to 3 by @dependabot in #16
v0.4.0-rc9
Hotfixes
validate
: unprivileged port start returned as default 1024 if kernel file not found- Created due to go sum proxy https://sum.golang.org/lookup/github.com/qdm12/gosettings@v0.4.0-rc8 failing
v0.4.0-rc7
Fixes
validate
: listening port validation- Check non root users against unprivileged start port found from Kernel file on Linux
- Check if the running program has the net_bind_service capability if trying to listen on a privileged port without root or windows
Maintenance
- Bump github/codeql-action from 2 to 3 by @dependabot in #16
v0.4.0-rc6
Features
- reader/sources/env: key prefix option, use settings struct to create source
Maintenance
- Tidy Go modules dependencies
v0.4.0-rc5
Hotfixes
reader
:Uint
returns auint
not anint
Features
reader
: addNetipPrefix
,NetipAddrPort
andCSVNetipAddrPorts
methods