aboutsummaryrefslogtreecommitdiff
path: root/src/strconv
diff options
context:
space:
mode:
authorRob Pike <r@golang.org>2019-11-11 14:34:36 +1100
committerRob Pike <r@golang.org>2019-11-11 19:56:33 +0000
commit0e312f212c11b9f35fdd85bcbb6ec082bc341c17 (patch)
tree33476be608c6e58ae104944648c414bd513c3fbb /src/strconv
parentad7ce3911f4947b4cccb435b6374e3808f0062db (diff)
downloadgo-0e312f212c11b9f35fdd85bcbb6ec082bc341c17.tar.gz
go-0e312f212c11b9f35fdd85bcbb6ec082bc341c17.zip
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>
Diffstat (limited to 'src/strconv')
-rw-r--r--src/strconv/example_test.go9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/strconv/example_test.go b/src/strconv/example_test.go
index 50f6b20fee..3b4cedbfd8 100644
--- a/src/strconv/example_test.go
+++ b/src/strconv/example_test.go
@@ -294,7 +294,8 @@ func ExampleParseUint() {
}
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)
// Output:
@@ -338,7 +339,8 @@ func ExampleQuoteRuneToGraphic() {
}
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)
// Output:
@@ -349,7 +351,8 @@ func ExampleQuoteToGraphic() {
s := strconv.QuoteToGraphic("☺")
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)
s = strconv.QuoteToGraphic(`" This is a ☺ \n "`)