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 <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Ian Lance Taylor <iant@google.com> Reviewed-by: Marcel van Lohuizen <mpvl@golang.org> Reviewed-by: Ian Lance Taylor <iant@google.com> Reviewed-by: Carlos Amedee <carlos@golang.org>
diff --git a/number/doc.go b/number/doc.go index 8766230..1999bc8 100644 --- a/number/doc.go +++ b/number/doc.go
@@ -11,16 +11,15 @@ // // p := message.NewPrinter(language.English) // -// p.Printf("%v bottles of beer on the wall.", number.Decimal(1234)) +// p.Printf("%v bottles of beer on the wall.\n", number.Decimal(1234)) // // Prints: 1,234 bottles of beer on the wall. // -// p.Printf("%v of gophers lose too much fur", number.Percent(0.12)) +// p.Printf("%v of gophers lose too much fur.\n", number.Percent(0.12)) // // Prints: 12% of gophers lose too much fur. // -// p := message.NewPrinter(language.Dutch) -// -// p.Printf("There are %v bikes per household.", number.Decimal(1.2)) -// // Prints: Er zijn 1,2 fietsen per huishouden. +// p = message.NewPrinter(language.Dutch) +// p.Printf("There are %v bikes per household.\n", number.Decimal(1.2)) +// // Prints: There are 1,2 bikes per household. // // The width and scale specified in the formatting directives override the // configuration of the formatter.