Skip to content

Commit 0e312f2

Browse files
committed
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 <[email protected]>
1 parent ad7ce39 commit 0e312f2

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/strconv/example_test.go

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,8 @@ func ExampleParseUint() {
294294
}
295295

296296
func ExampleQuote() {
297-
s := strconv.Quote(`"Fran & Freddie's Diner ☺"`) // there is a tab character inside the string literal
297+
// This string literal contains a tab character.
298+
s := strconv.Quote(`"Fran & Freddie's Diner ☺"`)
298299
fmt.Println(s)
299300

300301
// Output:
@@ -338,7 +339,8 @@ func ExampleQuoteRuneToGraphic() {
338339
}
339340

340341
func ExampleQuoteToASCII() {
341-
s := strconv.QuoteToASCII(`"Fran & Freddie's Diner ☺"`) // there is a tab character inside the string literal
342+
// This string literal contains a tab character.
343+
s := strconv.QuoteToASCII(`"Fran & Freddie's Diner ☺"`)
342344
fmt.Println(s)
343345

344346
// Output:
@@ -349,7 +351,8 @@ func ExampleQuoteToGraphic() {
349351
s := strconv.QuoteToGraphic("☺")
350352
fmt.Println(s)
351353

352-
s = strconv.QuoteToGraphic("This is a \u263a \u000a") // there is a tab character inside the string literal
354+
// This string literal contains a tab character.
355+
s = strconv.QuoteToGraphic("This is a \u263a \u000a")
353356
fmt.Println(s)
354357

355358
s = strconv.QuoteToGraphic(`" This is a ☺ \n "`)

0 commit comments

Comments
 (0)