Skip to content

chore(deps): replace usage of github.com/pkg/errors with stdlib #5529

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

Merged
merged 3 commits into from
Apr 7, 2025

Conversation

hazzik
Copy link
Contributor

@hazzik hazzik commented Mar 27, 2025

Remove usage of now archived github.com/pkg/errors package with stdlib

Checklist

Dear Author 👋, the following checks should be completed (or explicitly dismissed) before merging.

  • ✏️ Write a PR description, regardless of triviality, to include the value of this PR
  • 🔗 Reference related issues
  • 🏃 Test cases are included to exercise the new code
  • 🧪 If new packages are being introduced to stdlib, link to Working Group discussion notes and ensure it lands under experimental/
  • 📖 If language features are changing, ensure docs/Spec.md has been updated

Dear Reviewer(s) 👋, you are responsible (among others) for ensuring the completeness and quality of the above before approval.

@hazzik hazzik requested a review from a team as a code owner March 27, 2025 23:18
@hazzik hazzik force-pushed the depts/errors branch 2 times, most recently from 181e4ce to 586db98 Compare March 27, 2025 23:33
@hazzik hazzik closed this Apr 1, 2025
@hazzik hazzik reopened this Apr 1, 2025
Copy link
Contributor

@mhilton mhilton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code that is here is fine, there are a couple of problems that prevent it from merging though.

  • The commit messages should be in the semantic style
  • The change has exposed a poorly written error message which has upset staticcheck.

@mhilton
Copy link
Contributor

mhilton commented Apr 4, 2025

I think applying this patch will cause the test to pass.

diff --git a/internal/cmd/influxql-decode/main.go b/internal/cmd/influxql-decode/main.go
index 791067da..24cfa563 100644
--- a/internal/cmd/influxql-decode/main.go
+++ b/internal/cmd/influxql-decode/main.go
@@ -23,7 +23,7 @@ var rootCmd = &cobra.Command{
 		case 2:
 			return v2(cmd, args)
 		default:
-			return errors.New("Target version can only be 1 or 2.")
+			return errors.New("target version can only be 1 or 2")
 		}
 	},
 }

@hazzik
Copy link
Contributor Author

hazzik commented Apr 5, 2025

Thanks for the review, @mhilton. I've fixed the issues.

Copy link
Contributor

@mhilton mhilton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change has broken a test.

@hazzik hazzik requested a review from mhilton April 7, 2025 12:55
@mhilton mhilton merged commit bf8425e into influxdata:master Apr 7, 2025
7 checks passed
@mhilton
Copy link
Contributor

mhilton commented Apr 7, 2025

Thanks for your patience @hazzik.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants