Repository navigation
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
When
FailFast(false)collected an error for one field, later valid numeric, boolean, float, time, and duration slice fields were parsed but left unchanged. This change lets each slice binding assign its result when that specific conversion adds no errors, while retaining atomic no-assignment when an element in the current slice is invalid.Reproduction
A query containing
bad=nope&ints=1&ints=2followed by:returned the expected error for
bad, butintsremained at its previous value. The regression test reproduced the same behavior across integer, unsigned integer, boolean, float, time, and duration slices before the production change.Root cause
The slice converters assigned their temporary result only when the binder's complete error list was nil. Under
FailFast(false), that list can contain an unrelated earlier error even when the current slice converted successfully.Changes
No public API or dependency changes are introduced; documentation is unchanged because this restores the documented
FailFast(false)behavior.Validation
go test ./... -run '^TestValueBinder_FailFastFalseBindsValidSlicesAfterError$' -count=1— passgo test ./... -count=1— passmake vet— passgo test -race ./...— passmake lint— passgit diff --check— pass