Skip to content

Commit

Permalink
Lazily initialize regexes to speed up init() (#1277)
Browse files Browse the repository at this point in the history
Using `GODEBUG=inittrace=1` I found a relatively constant 10ms init
caused by this function.

Replaces #1246.

@go-playground/validator-maintainers
  • Loading branch information
kylecarbs authored Jun 12, 2024
1 parent c7e8518 commit 2e1df48
Show file tree
Hide file tree
Showing 4 changed files with 158 additions and 136 deletions.
Loading

0 comments on commit 2e1df48

Please sign in to comment.