
commit a1a37d335a8e89ac89d85c00c8585d3fc02e064a Author: Josh Baker <joshbaker77@gmail.com> Date: Thu Oct 5 07:36:54 2017 -0700 use symlink instead of copy commit 96399c2c92620f633611c778e5473200bfd48d41 Author: Josh Baker <joshbaker77@gmail.com> Date: Thu Oct 5 07:19:26 2017 -0700 use dep for vendoring
29 lines
1.1 KiB
Go
29 lines
1.1 KiB
Go
// Copyright 2017 The Go Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
// Package number formats numbers according to the customs of different locales.
|
|
//
|
|
// The number formats of this package allow for greater formatting flexibility
|
|
// than passing values to message.Printf calls as is. It currently supports the
|
|
// builtin Go types and anything that implements the Convert interface
|
|
// (currently internal).
|
|
//
|
|
// p := message.NewPrinter(language.English)
|
|
//
|
|
// p.Printf("%v bottles of beer on the wall.", 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))
|
|
// // 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.
|
|
//
|
|
//
|
|
// The width and scale specified in the formatting directives override the
|
|
// configuration of the formatter.
|
|
package number
|