Skip to content

v0.4.0-rc2

Pre-release
Pre-release
Compare
Choose a tag to compare
@qdm12 qdm12 released this 21 Nov 18:31
· 27 commits to main since this release

Breaking changes

  • reader package which replaces all sources packages
    • Merge functions in merge.go removed (now unneeded)
    • Settings reader now reads from multiple sources in order
    • sources/merger removed
    • sources/env removed (replaced by reader package)
    • Define Env reader-compatible Source
    • parse package generic functions accept source interfaces instead of keyValues map
    • Update all code comments, example and readme
  • reader package: New takes a Settings struct as its unique argument
  • Number constraint and constraints.go file removed
  • Override: OverrideWithComparable function, replacing OverrideWithNumber, OverrideWithString, OverrideWithPointerRaw, OverrideWithInterface and OverrideWithSliceRaw
  • Defaults: DefaultComparable function, replacing DefaultNumber, DefaultString, DefaultPointerRaw, DefaultInterface and DefaultSliceRaw
  • parse package: try parsing the empty string if AllowEmpty(true) option is used

Features

  • reader package: add DefaultOptions field to the Settings struct
  • reader package: add FirstKeySet function

Fixes

  • reader/parse package:
    • settings default properly set handleDeprecatedKey function
    • parseBool returns a bool pointer

Documentation

  • Review code comments
    • fix godoc comments bullet list formatting
    • fix godoc comments new lines formatting
    • mention default settings for CSV methods
    • change the error context to its message
    • mention nil slices conditions for CSV methods
    • review AcceptEmpty option comment