Skip to content

refactor: initialize validator and translator once at package level#313

Merged
bfabio merged 1 commit intomainfrom
perfvalidator
Mar 16, 2026
Merged

refactor: initialize validator and translator once at package level#313
bfabio merged 1 commit intomainfrom
perfvalidator

Conversation

@bfabio
Copy link
Copy Markdown
Member

@bfabio bfabio commented Mar 14, 2026

The validator is thread safe and expensive to create (it registers all custom validators and translations).

Build it once at package initialization.

The validator is thread safe and expensive to create (it registers all
custom validators and translations).

Build it once at package initialization.
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 14, 2026

Codecov Report

❌ Patch coverage is 85.71429% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 50.42%. Comparing base (58b8033) to head (93a3fb9).
⚠️ Report is 6 commits behind head on main.

Files with missing lines Patch % Lines
fields.go 60.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #313      +/-   ##
==========================================
+ Coverage   45.35%   50.42%   +5.06%     
==========================================
  Files          14       14              
  Lines        1087     1188     +101     
==========================================
+ Hits          493      599     +106     
+ Misses        563      557       -6     
- Partials       31       32       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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

@bfabio bfabio merged commit 597210e into main Mar 16, 2026
7 checks passed
@bfabio bfabio deleted the perfvalidator branch March 16, 2026 13:12
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