replace go-multierror with native errors.Join - #3
Merged
Merged
Conversation
Author
|
/cc @jordanstephens ptal 🤗 |
defangdevs
approved these changes
Sep 16, 2026
defangdevs
left a comment
There was a problem hiding this comment.
Verified this drop-in replacement of go-multierror with stdlib errors.Join:
go build ./...andgo vet ./pkg/detectors/helpers/... ./pkg/scanner/...are clean on this branch.- Ran the full test suite on both
mainand this branch (go1.26.4) — identical failure set on both (artifactory detector count mismatches, pkg/tests format mismatches, json/yaml transformer nil-handling). These are pre-existing, unrelated to this change, and not introduced by it. - The rewrite also fixes two latent bugs in the original code, where
multierror.Append(currErr)(single-arg form) only ever kept the last error instead of accumulating —findAll/FindAllin key_value_regex.go andscanString/scanMapin scanner.go now correctly accumulate viaerrs = append(...)+errors.Join.
No CI is configured on this fork, so this review is manual. LGTM — approving.
Member
|
@defangdevs rebase |
This module has go1.20 as minimum supported Go version, which supports native multi-errors through errors.Join. This patch replaces uses of go-multierror with native errors.Join to remove some dependencies. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
defangdevs
force-pushed
the
rm_multierror
branch
from
September 16, 2026 19:17
23bc555 to
9b2d9aa
Compare
|
Rebased onto |
|
CI failure ( |
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.
This module has go1.20 as minimum supported Go version, which supports native multi-errors through errors.Join.
This patch replaces uses of go-multierror with native errors.Join to remove some dependencies.