Update dependencies, run go fix and support errors.Is on MultiError - #15
Merged
Conversation
Coverage Report for CI Build 32195109371Warning No base build found for commit Coverage: 98.87%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsRequires a base build to compare against. How to fix this → Coverage Stats
💛 - Coveralls |
paskal
force-pushed
the
modernize-and-deps
branch
2 times, most recently
from
August 18, 2026 22:27
178891e to
c1ba1b6
Compare
Bump testify to v1.12.0 and move the workflow to checkout@v7, setup-go@v7 and golangci-lint-action@v9. Push branch and tag filters spelled out as "**" to keep actionlint happy.
Modernizers replace the counted loops with range-over-int, available since go 1.22. The per-iteration loop variable copies are not needed since the same version either.
Previously the preemptive and discard tests compared runtime.NumGoroutine against absolute numbers, which counts goroutines left over from the earlier tests and failed at random. The limit is now relative to the count taken at the start of the test, and the concurrency the options promise is checked directly by tracking how many functions run at once.
MultiError implements Unwrap() []error, so the error returned by Wait matches any of the collected errors, the same way errors.Join behaves. Errors returns a copy of the collected slice, as the caller shouldn't be able to change the content of the error.
umputun
force-pushed
the
modernize-and-deps
branch
from
August 18, 2026 22:57
c1ba1b6 to
58a25d8
Compare
umputun
approved these changes
Aug 18, 2026
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.
Based on #14, please review that one first.
go fix ./...replaced the counted loops with range-over-int and dropped the per-iteration loop variable copies, neither of which is needed since go 1.22.MultiErrorimplementsUnwrap() []error, soerrors.Isanderrors.Asmatch any of the collected errors, andErrorsreturns a copy of the slice, as the caller should not be able to change the content of the error. The README example is corrected as well, it passed afunc(ctx context.Context) errortoErrSizedGroup.Go, which takesfunc() error.runtime.NumGoroutine()against absolute numbers, which counts goroutines left over from the earlier tests; on master they fail in about two runs out of ten. The limit is relative to the count taken at the start of the test now, and the concurrency the options promise is checked directly by tracking how many functions run at once.