-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: replace urso/sderr with stdlib errors #69
Conversation
Go 1.20 added support for wrapping multiple errors so we can migrate to native errors and drop the additional dependency on github.com/urso/sderr. This allows beats and other downstream users to drop sderr as well.
the go.mod uses a go 1.20 directive so go 1.19 is not supported
@@ -12,7 +12,6 @@ steps: | |||
matrix: | |||
setup: | |||
go_version: | |||
- "1.19.5" | |||
- "1.20.5" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about updating to the actively maintained go versions go 1.21 and 1.22?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer for it to go in a separate PR along with bumping the go version to 1.21
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SGTM
test failure is uinrelated to this PR and already happening in main |
@belimawr Thanks for the review! 🙇 fwiw it seems I don't have permission to merge this :( |
CI is failing on Windows, maybe that's why you can't merge. Could you take a look? |
I don't think that't the reason, the button is missing and I see
CI seems to be broken on main too (same test) so it looks unrelated to my changes |
Indeed. I rather fix |
use atomic.Int64 to avoid race condition and make sure to increment the counter before closing the channel.
use forever (~1h) duration to ensure the timeout/interval is ignored if fn does not returns an error or a canceled context is passed (test 1 and 3). use a large period to ensure the task doesn't stop waiting before the ctx expired.
@belimawr Sure! 😄 I've pushed some changes, they should address the failing tests. |
Go 1.20 added support for wrapping multiple errors so we can migrate to native errors and drop the additional dependency on github.com/urso/sderr. This allows beats and other downstream users to drop sderr as well.