Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR addresses Go linting findings in the console flag utilities, focusing on simplifying string formatting in StringMap.String().
Changes:
- Replaced
buffer.WriteString(fmt.Sprintf(...))withfmt.Fprintf(&buffer, ...)to satisfy linter guidance.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
187
to
189
| for _, key := range keys { | ||
| buffer.WriteString(fmt.Sprintf(`"%s=%s", `, key, m.m[key])) | ||
| fmt.Fprintf(&buffer, `"%s=%s", `, key, m.m[key]) | ||
| } |
There was a problem hiding this comment.
The raw string passed to fmt.Fprintf is now \"%s=%s\", , which will output literal backslashes (e.g., "key=value") instead of quoting with ". Since this is a raw string literal (backticks), the quotes don’t need escaping—use "%s=%s", without the backslashes to preserve the previous output format.
fabpot
approved these changes
Apr 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.