Skip to content

Releases: qdm12/gosettings

v0.4.4

12 Nov 09:10
Compare
Choose a tag to compare

v0.4.4-rc1

28 Aug 14:12
Compare
Choose a tag to compare
v0.4.4-rc1 Pre-release
Pre-release

Fixes

  • validate: linux only: handle permission denied on ip_unprivileged_port_start and return start port 1024 in that case

v0.4.3

26 Aug 20:12
ebff231
Compare
Choose a tag to compare

Fixes

  • reader: default force lowercase option to true to match documentation

v0.4.2

12 Jul 19:52
Compare
Choose a tag to compare

Fixes

  • internal/parse: ignore empty set values if accept empty setting is false - this caused an issue such as this one

Maintenance

  • internal/parse: add get unit tests with mock of Source

v0.4.1

26 Mar 07:21
Compare
Choose a tag to compare

Fixes

  • do not reuse key to try transformed for previous source

v0.4.0

25 Mar 19:12
Compare
Choose a tag to compare

Breaking changes

  • reader and internal/parse packages which replace previous sources/env and sources/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, replacing OverrideWithNumber, OverrideWithString, OverrideWithPointerRaw, OverrideWithInterface and OverrideWithSliceRaw
  • Defaults: DefaultComparable function, replacing DefaultNumber, DefaultString, DefaultPointerRaw, DefaultInterface and DefaultSliceRaw
  • Number constraint and constraints.go file removed (no longer needed)

Features

  • reader/sources/env environment variable reader-compatible source
  • reader/sources/flags CLI flags reader-compatible source
  • reader package (previously sources/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 and Float64Ptr

Fixes

  • validate: allow empty listening addresses
  • 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
  • internal/parse (previously within sources/env/parse.go):
    • try parsing the empty string if AllowEmpty(true) option is specified
  • reader and internal/parse (previously sources/env):
    • BoolPtr returns nil 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 to its 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

19 Jan 16:59
Compare
Choose a tag to compare
v0.4.0-rc9 Pre-release
Pre-release

Hotfixes

v0.4.0-rc7

19 Jan 14:13
75485e0
Compare
Choose a tag to compare
v0.4.0-rc7 Pre-release
Pre-release

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

v0.4.0-rc6

14 Jan 09:51
Compare
Choose a tag to compare
v0.4.0-rc6 Pre-release
Pre-release

Features

  • reader/sources/env: key prefix option, use settings struct to create source

Maintenance

  • Tidy Go modules dependencies

v0.4.0-rc5

26 Nov 18:02
Compare
Choose a tag to compare
v0.4.0-rc5 Pre-release
Pre-release

Hotfixes

  • reader: Uint returns a uint not an int

Features

  • reader: add NetipPrefix, NetipAddrPort and CSVNetipAddrPorts methods