Skip to content

v0.4.1

Latest

Choose a tag to compare

@github-actions github-actions released this 12 Apr 08:25
· 5 commits to master since this release

🐛 Bug Fixes

  • Correctness: Ordinal(math.MinInt, …) no longer stack-overflows — same magnitude-via-uint64 pattern the cardinal path already uses. #19 @rekurt
  • Input robustness: DecimalToWords and DecimalToWordsPrecision now accept leading/trailing whitespace uniformly (previously crashed strconv.Atoi with "invalid syntax"). #20 @rekurt
  • API consistency: MoneyFromString("-0.xx", …) preserves the minus sign (previously silently dropped it, producing "ноль рублей пятьдесят копеек" for "-0.50"). #21 @rekurt
  • Silent correctness: DecimalValueToWords now returns ErrNumberTooLarge for inputs whose whole part overflows int64. Previously the guard was a 64-bit tautology and the function silently rendered wrapped int64 bits as a valid-looking-but-wrong phrase. #22 @rekurt

⚡ Performance

  • convertPositiveUint64ToWords replaced O(triads²) prepend with preallocated linear append + in-place reverse. Apple M1 Pro: −23% allocs, −14% time on math.MaxInt. Scales better for duodecillion-range inputs. #23 @rekurt

📚 Documentation

  • Added runnable godoc Example* functions for Ordinal, Money, MoneyFromString, DecimalToWordsPrecision — v0.4.0 shipped these APIs but pkg.go.dev showed no runnable examples until now. #24 @rekurt

🧪 Tests & CI

  • Added README consistency checks: AST walks the package and asserts every exported declaration appears in both README.md and README_EN.md, plus a ##/### parity check between RU and EN. Runs as a regular Go test — no workflow changes. #18 @rekurt
  • Added govulncheck step (pinned v1.1.4) to the lint job. Current master is clean: 0 reachable vulnerabilities. #25 @rekurt

Full Changelog: v0.4.0...v0.4.1