Skip to content

Commit

Permalink
x/text: Correct examples in number/doc
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
dveeden authored and gopherbot committed Sep 23, 2024
1 parent 38a95c2 commit 3043346
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions number/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 3043346

Please sign in to comment.