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

refactor: use %q to simplify fmt.Sprintf #1674

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

alexandear
Copy link
Contributor

@alexandear alexandear commented Oct 30, 2024

Summary

The PR simplifies strings inside fmt.Sprintf statements.

Changes

Replace "\"%s\"" with %q.

Motivation

%q has fewer symbols than "\"%s\"" but means the same for strings. See https://pkg.go.dev/fmt#hdr-Printing:

%q	a double-quoted string safely escaped with Go syntax

@alexandear alexandear force-pushed the refactor/simplify-with-sprintf-q branch from 9783d40 to d57bac8 Compare November 24, 2024 16:28
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