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

dev: avoid string conversion by passing byte slice #5304

Merged
merged 2 commits into from
Jan 8, 2025

Conversation

alexandear
Copy link
Member

The PR refactors code:

  • Change patch string to patch []byte in ExtractDiagnosticFromPatch.
  • Rename theDiff to patch in the goformatters.NewAnalyzer.
  • Use patch instead of string(patch) as %q will correctly output byte slice as string.

@ldez ldez added the topic: cleanup Related to code, process, or doc cleanup label Jan 8, 2025
@ldez ldez added this to the next milestone Jan 8, 2025
Copy link
Member

@ldez ldez left a comment

Choose a reason for hiding this comment

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

LGTM

@ldez ldez merged commit fb1674e into golangci:master Jan 8, 2025
15 checks passed
@alexandear alexandear deleted the refactor/pass-byte-slice branch January 8, 2025 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: cleanup Related to code, process, or doc cleanup
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants