Skip to content

Releases: edgarsilva/simpleenv

v1.3.0

Choose a tag to compare

@edgarsilva edgarsilva released this 02 Mar 19:06

Added

  • Added minlen and maxlen constraints for string and encoding.TextUnmarshaler fields.

Changed

  • Length checks use Unicode rune count via utf8.RuneCountInString.
  • Added validation and integration tests for min/max length success/failure, trim interactions, and invalid type/tag values.
  • Updated README and changelog docs for constraint behavior and migration guidance.

v1.2.0

Choose a tag to compare

@edgarsilva edgarsilva released this 02 Mar 17:41

Added

  • Added explicit trimspace tag support for string and encoding.TextUnmarshaler fields.

Changed

  • trimspace now trims leading/trailing whitespace before allowempty, validation constraints, and parsing.
  • Numeric and duration parsing remain strict (no implicit whitespace trimming).
  • Added tests and README updates for trim behavior and constraints.

v1.1.2

Choose a tag to compare

@edgarsilva edgarsilva released this 25 Feb 21:40

Added

  • Added min and max constraint support for time.Duration fields using duration values (for example: 500ms, 2s, 1m).

Changed

  • Updated docs to clarify that min/max work with numeric types and time.Duration.
  • Added validation tests for duration min/max success and failure scenarios.

v1.1.1

Choose a tag to compare

@edgarsilva edgarsilva released this 25 Feb 21:21

Highlights

  • Added allowempty support for string and encoding.TextUnmarshaler fields.
  • Tagged env vars with empty values (KEY=) are now rejected by default unless allowempty is set.
  • Clarified docs for missing vs empty env var behavior and allowempty constraints.
  • Expanded tests for allowempty success and error paths.

Compatibility

  • Patch release focused on validation correctness and documentation clarity.

v1.1.0

Choose a tag to compare

@edgarsilva edgarsilva released this 25 Feb 20:23

Highlights

  • Added richer built-in format validation: URI, FILE, DIR, HOSTPORT, UUID, IP, HEX, ALPHANUMERIC, and IDENTIFIER.
  • Expanded type parsing support for bool, int64, uint, time.Duration, and custom encoding.TextUnmarshaler types.
  • Hardened validation and loader behavior: better optional handling, stricter tag parsing, unknown-constraint and format errors, and clearer error messages.
  • Improved quality and maintainability with refreshed docs/examples and a true table-driven test suite refactor.

Compatibility

  • Backward-compatible release (minor version bump to v1.1.0).