-
Notifications
You must be signed in to change notification settings - Fork 233
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
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Justin King <[email protected]>
Signed-off-by: Justin King <[email protected]>
Signed-off-by: Justin King <[email protected]>
Signed-off-by: Justin King <[email protected]>
Signed-off-by: Justin King <[email protected]>
Signed-off-by: Justin King <[email protected]>
Signed-off-by: Justin King <[email protected]>
@@ -186,6 +186,10 @@ func (s String) Value() any { | |||
return string(s) | |||
} | |||
|
|||
func (s String) String() string { | |||
return strconv.Quote(string(s)) |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
.
No description provided.