Update module github.com/gookit/validate to v1.6.0 #14

Merged
paspo merged 1 commit from renovate/github.com-gookit-validate-1.x into master 2026-06-04 08:07:40 +00:00
Collaborator

This PR contains the following updates:

Package Change Age Confidence
github.com/gookit/validate v1.5.7v1.6.0 age confidence

Release Notes

gookit/validate (github.com/gookit/validate)

v1.6.0

Compare Source

Internal performance refactor. No public API changes — drop-in upgrade.

Performance
  • Cache per-type reflection metadata (field index, tags, kinds, interface
    checks) in a concurrency-safe type cache; access struct fields via
    FieldByIndex instead of FieldByName.
  • Cache the parsed rule template for "static" struct types (no
    ptr-to-struct / slice-of-struct / map-of-struct) and clone it per
    validation, skipping the per-instance tag walk and rule parsing. Dynamic
    types keep the original per-value path.
  • Share built-in error messages instead of copying ~150 entries into every
    Translator; resolve with a custom→builtin fallback.
  • Build the built-in context validators (required*, *Field, file checks)
    lazily on first use instead of eagerly per instance.

Measured (Go 1.25, count=6): static struct validation ~-78% time / -74%
allocations
(10403→2295 ns/op, 132→34 allocs/op); map validation -65% /
-42%; slice-of-struct -37% / -20%. Behavior is byte-identical, guarded by a
rule-collection golden test.

Fixes
  • Fix a stack overflow when building metadata for self-referential or
    mutually-recursive struct types.
  • Fix a data race in Val/Var: concurrent calls shared one validation
    instance and raced on its error/validator maps; each call now uses a
    pooled instance.

Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Enabled.

Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Renovate Bot.

This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [github.com/gookit/validate](https://github.com/gookit/validate) | `v1.5.7` → `v1.6.0` | ![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fgookit%2fvalidate/v1.6.0?slim=true) | ![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fgookit%2fvalidate/v1.5.7/v1.6.0?slim=true) | --- ### Release Notes <details> <summary>gookit/validate (github.com/gookit/validate)</summary> ### [`v1.6.0`](https://github.com/gookit/validate/blob/HEAD/CHANGELOG.md#v160) [Compare Source](https://github.com/gookit/validate/compare/v1.5.7...v1.6.0) Internal performance refactor. **No public API changes** — drop-in upgrade. ##### Performance - Cache per-type reflection metadata (field index, tags, kinds, interface checks) in a concurrency-safe type cache; access struct fields via `FieldByIndex` instead of `FieldByName`. - Cache the parsed rule template for "static" struct types (no ptr-to-struct / slice-of-struct / map-of-struct) and clone it per validation, skipping the per-instance tag walk and rule parsing. Dynamic types keep the original per-value path. - Share built-in error messages instead of copying \~150 entries into every `Translator`; resolve with a custom→builtin fallback. - Build the built-in context validators (`required*`, `*Field`, file checks) lazily on first use instead of eagerly per instance. Measured (Go 1.25, count=6): static struct validation **\~-78% time / -74% allocations** (10403→2295 ns/op, 132→34 allocs/op); map validation -65% / -42%; slice-of-struct -37% / -20%. Behavior is byte-identical, guarded by a rule-collection golden test. ##### Fixes - Fix a stack overflow when building metadata for self-referential or mutually-recursive struct types. - Fix a data race in `Val`/`Var`: concurrent calls shared one validation instance and raced on its error/validator maps; each call now uses a pooled instance. </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4xMzguMyIsInVwZGF0ZWRJblZlciI6IjQzLjEzOC4zIiwidGFyZ2V0QnJhbmNoIjoibWFzdGVyIiwibGFiZWxzIjpbXX0=-->
renovate-bot scheduled this pull request to auto merge when all checks succeed 2026-06-03 20:49:23 +00:00
Author
Collaborator

ℹ️ Artifact update notice

File name: go.mod

In order to perform the update(s) described in the table above, Renovate ran the go get command, which resulted in the following additional change(s):

  • 1 additional dependency was updated

Details:

Package Change
github.com/gookit/goutil v0.7.4 -> v0.7.6
### ℹ️ Artifact update notice ##### File name: go.mod In order to perform the update(s) described in the table above, Renovate ran the `go get` command, which resulted in the following additional change(s): - 1 additional dependency was updated Details: | **Package** | **Change** | | :------------------------- | :------------------- | | `github.com/gookit/goutil` | `v0.7.4` -> `v0.7.6` |
paspo merged commit 48961a7a7a into master 2026-06-04 08:07:40 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
paspo/mail-autoconfig!14
No description provided.