Skip to content

refactor: replace []byte(fmt.Sprintf) with fmt.Appendf #3932

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 2 commits into from
May 6, 2025

Conversation

findnature
Copy link
Contributor

Why this should be merged

Optimize code using a more modern writing style. Official support from Go, for more details visit https://pkg.go.dev/golang.org/x/tools/gopls/internal/analysis/modernize.

How this works

How this was tested

Need to be documented in RELEASES.md?

Signed-off-by: findnature <cricis@aliyun.com>
@StephenButtolph
Copy link
Contributor

@findnature Would it be possible to enable modernize in our existing golangci-lint tests?

@joshua-kim joshua-kim moved this to Ready 🚦 in avalanchego May 5, 2025
@StephenButtolph
Copy link
Contributor

After looking around - it doesn't seem trivial to include gopls suggestions into golangci-lint. Bummer.

@StephenButtolph StephenButtolph merged commit fe25cc3 into ava-labs:master May 6, 2025
23 checks passed
@github-project-automation github-project-automation bot moved this from Ready 🚦 to Done 🎉 in avalanchego May 6, 2025
@findnature
Copy link
Contributor Author

After looking around - it doesn't seem trivial to include gopls suggestions into golangci-lint. Bummer.

Yes, it's still not very mature and has some bugs. The code processed by it may not compile successfully and will likely require manual intervention.

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

Successfully merging this pull request may close these issues.

2 participants