Skip to content

chore: Remove usage of errors.Cause#5291

Merged
lukemassa merged 1 commit intorunatlantis:mainfrom
lukemassa:remove_errors_cause
Feb 2, 2025
Merged

chore: Remove usage of errors.Cause#5291
lukemassa merged 1 commit intorunatlantis:mainfrom
lukemassa:remove_errors_cause

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 X-Guardian, jamengual and nitrocode 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
Signed-off-by: Luke Massa <lukefrederickmassa@gmail.com>
@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 <lukefrederickmassa@gmail.com>
Signed-off-by: Petr Bubenik <petr.bubenik@drmax.eu>
bub3n pushed a commit to bub3n/atlantis that referenced this pull request Feb 4, 2025
Signed-off-by: Luke Massa <lukefrederickmassa@gmail.com>
Signed-off-by: Petr Bubenik <petr.bubenik@drmax.eu>
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