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

Update strings.format to adhere to the specification #1133

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

jcking
Copy link
Collaborator

@jcking jcking commented Feb 19, 2025

No description provided.

@@ -186,6 +186,10 @@ func (s String) Value() any {
return string(s)
}

func (s String) String() string {
return strconv.Quote(string(s))
Copy link
Collaborator

@TristonianJones TristonianJones Feb 21, 2025

Choose a reason for hiding this comment

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

I feel like we should leave this one alone and maybe use %q in places where we print the string like in lists and maps. Seems less likely to hit a change-detector test issue that way too.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Unfortunately we cannot use %q because that would quote everything, including ints. We pass ref.Value to %s.

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