Skip to content

feat: maintain ISO 4217 currency codes internally, drop govalidat… - #224

Open
nguyenvantuan2391996 wants to merge 1 commit into
go-ozzo:masterfrom
nguyenvantuan2391996:feat/ISO4127
Open

feat: maintain ISO 4217 currency codes internally, drop govalidat…#224
nguyenvantuan2391996 wants to merge 1 commit into
go-ozzo:masterfrom
nguyenvantuan2391996:feat/ISO4127

Conversation

@nguyenvantuan2391996

Copy link
Copy Markdown
Contributor

Summary

  • govalidator.IsISO4217 hasn't been updated since v11.0.1 (2021) and is missing several currently active codes (VES, VED, MRU, SLE, XCG, ZWG), with no upstream release in sight to fix it Missing VES/VED from ISO4127 list #206.

  • Replace CurrencyCode's backing data with an internally maintained set of active ISO 4217 codes, sourced from the ISO 4217 Maintenance Agency (SIX Group) and cross-checked against datasets/currency-codes, snapshot 2026-08-14.

  • Add regression tests for the previously missing codes and for codes that have since been withdrawn (USS, ANG, BGN).

@github-actions

Copy link
Copy Markdown

Benchmark Comparison

Summary: geomean 1.391µ 1.421µ +2.17%

⚠️ Potential regressions detected:

ValidateStructWithContext-4        2.286µ ± ∞ ¹   2.668µ ± ∞ ¹  +16.71% (p=0.008 n=5)
ValidateMap-4                      1.627µ ± ∞ ¹   1.661µ ± ∞ ¹   +2.09% (p=0.008 n=5)
geomean                            1.391µ         1.421µ         +2.17%
geomean                           1.326Ki         1.326Ki        +0.00%
geomean                             24.57         24.57        +0.00%

Full results available in workflow artifacts. CI runners have ~10-20% variance.

@codecov

codecov Bot commented Aug 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.37%. Comparing base (4c6f999) to head (816ee50).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #224   +/-   ##
=======================================
  Coverage   99.37%   99.37%           
=======================================
  Files          21       22    +1     
  Lines         954      957    +3     
=======================================
+ Hits          948      951    +3     
  Misses          3        3           
  Partials        3        3           
Flag Coverage Δ
unittests 99.37% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant