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

fix: errors.New use error #2347

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

RiceChuan
Copy link

fix: It is recommended to use the fmt.Errorf method with parameters instead of the errors.New method without parameters.

…nstead of the errors.New method without parameters.

Signed-off-by: RiceChuan <[email protected]>
@weiihann
Copy link
Contributor

weiihann commented Dec 24, 2024

Thanks for the PR. The edits merely change from errors.New to fmt.Errorf without removing the string concatenation. Please use the proper conventional formatting, for example fmt.Errorf(...%v...).

Also, other places have the same issue as well:

This error is reused multiple times, please create a constant and replace them.

It'll be great if you can help to make the changes :) Please rebase on main once you apply the changes

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.

2 participants