Skip to content

Commit 3043346

Browse files
dveedengopherbot
authored andcommitted
x/text: Correct examples in number/doc
Playground example: https://go.dev/play/p/9cuRyaNveO8 Change-Id: I2fbc3fec0f3755eb3d11b47edfb2201d66fc622d Reviewed-on: https://go-review.googlesource.com/c/text/+/614395 LUCI-TryBot-Result: Go LUCI <[email protected]> Auto-Submit: Ian Lance Taylor <[email protected]> Reviewed-by: Marcel van Lohuizen <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]> Reviewed-by: Carlos Amedee <[email protected]>
1 parent 38a95c2 commit 3043346

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

number/doc.go

+5-6
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,15 @@
1111
//
1212
// p := message.NewPrinter(language.English)
1313
//
14-
// p.Printf("%v bottles of beer on the wall.", number.Decimal(1234))
14+
// p.Printf("%v bottles of beer on the wall.\n", number.Decimal(1234))
1515
// // Prints: 1,234 bottles of beer on the wall.
1616
//
17-
// p.Printf("%v of gophers lose too much fur", number.Percent(0.12))
17+
// p.Printf("%v of gophers lose too much fur.\n", number.Percent(0.12))
1818
// // Prints: 12% of gophers lose too much fur.
1919
//
20-
// p := message.NewPrinter(language.Dutch)
21-
//
22-
// p.Printf("There are %v bikes per household.", number.Decimal(1.2))
23-
// // Prints: Er zijn 1,2 fietsen per huishouden.
20+
// p = message.NewPrinter(language.Dutch)
21+
// p.Printf("There are %v bikes per household.\n", number.Decimal(1.2))
22+
// // Prints: There are 1,2 bikes per household.
2423
//
2524
// The width and scale specified in the formatting directives override the
2625
// configuration of the formatter.

0 commit comments

Comments
 (0)