Skip to content
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

chore: Remove usage of errors.Cause #5291

Merged
merged 1 commit into from
Feb 2, 2025

Conversation

lukemassa
Copy link
Contributor

what

Remove all usages of errors.Cause()

why

We are replacing pkg/errors with the standard library errors (#5269). One method the standard library does not have is Cause(). It does have errors.Is, which is in fact just a thin wrapper around the std library's (https://github.com/pkg/errors/blob/master/go113.go#L16), so even though this package is importing and using pkg/errors, when it is changed to import and use std library, this new line will be a no-op.

tests

Ran unit tests.

references

@lukemassa lukemassa requested review from a team as code owners February 1, 2025 20:48
@lukemassa lukemassa requested review from jamengual, nitrocode and X-Guardian and removed request for a team February 1, 2025 20:48
@dosubot dosubot bot added the refactoring Code refactoring that doesn't add additional functionality label Feb 1, 2025
@github-actions github-actions bot added the go Pull requests that update Go code label Feb 1, 2025
@lukemassa lukemassa force-pushed the remove_errors_cause branch from ae83247 to fa651df Compare February 1, 2025 20:56
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Feb 1, 2025
@lukemassa lukemassa merged commit 27007e8 into runatlantis:main Feb 2, 2025
39 checks passed
bub3n pushed a commit to bub3n/atlantis that referenced this pull request Feb 3, 2025
Signed-off-by: Luke Massa <[email protected]>
Signed-off-by: Petr Bubenik <[email protected]>
bub3n pushed a commit to bub3n/atlantis that referenced this pull request Feb 4, 2025
Signed-off-by: Luke Massa <[email protected]>
Signed-off-by: Petr Bubenik <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
go Pull requests that update Go code lgtm This PR has been approved by a maintainer refactoring Code refactoring that doesn't add additional functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants