1
0
mirror of https://github.com/golang/go synced 2024-11-17 13:44:43 -07:00

strconv: reformat and tidy comments in example

Apply the suggestions made in the too-late review of
	golang.org/cl/137215
to move the comments to a separate line and use proper
punctuation.

Change-Id: If2b4e5ce8af8c78fa51280d5c87c852a76dae459
Reviewed-on: https://go-review.googlesource.com/c/go/+/206125
Reviewed-by: Robert Griesemer <gri@golang.org>
This commit is contained in:
Rob Pike 2019-11-11 14:34:36 +11:00
parent ad7ce3911f
commit 0e312f212c

View File

@ -294,7 +294,8 @@ func ExampleParseUint() {
} }
func ExampleQuote() { func ExampleQuote() {
s := strconv.Quote(`"Fran & Freddie's Diner ☺"`) // there is a tab character inside the string literal // This string literal contains a tab character.
s := strconv.Quote(`"Fran & Freddie's Diner ☺"`)
fmt.Println(s) fmt.Println(s)
// Output: // Output:
@ -338,7 +339,8 @@ func ExampleQuoteRuneToGraphic() {
} }
func ExampleQuoteToASCII() { func ExampleQuoteToASCII() {
s := strconv.QuoteToASCII(`"Fran & Freddie's Diner ☺"`) // there is a tab character inside the string literal // This string literal contains a tab character.
s := strconv.QuoteToASCII(`"Fran & Freddie's Diner ☺"`)
fmt.Println(s) fmt.Println(s)
// Output: // Output:
@ -349,7 +351,8 @@ func ExampleQuoteToGraphic() {
s := strconv.QuoteToGraphic("☺") s := strconv.QuoteToGraphic("☺")
fmt.Println(s) fmt.Println(s)
s = strconv.QuoteToGraphic("This is a \u263a \u000a") // there is a tab character inside the string literal // This string literal contains a tab character.
s = strconv.QuoteToGraphic("This is a \u263a \u000a")
fmt.Println(s) fmt.Println(s)
s = strconv.QuoteToGraphic(`" This is a ☺ \n "`) s = strconv.QuoteToGraphic(`" This is a ☺ \n "`)