diff options
author | Blixt <me@blixt.nyc> | 2017-11-01 16:25:24 -0400 |
---|---|---|
committer | Tobias Klauser <tobias.klauser@gmail.com> | 2017-11-02 09:01:40 +0000 |
commit | 0d101d1a9fea83fa2663b834933328c83f6e960b (patch) | |
tree | 492780e6cb33134741aaa966f2d5480a6e9d5fb8 /src/time/example_test.go | |
parent | 2dd110f9a73b369bebc1f1d99576ab2170827652 (diff) | |
download | go-0d101d1a9fea83fa2663b834933328c83f6e960b.tar.gz go-0d101d1a9fea83fa2663b834933328c83f6e960b.zip |
time: fix incorrect "zero pad" comment in example
The comment currently implies that a zero will be added, but the
underscore is used to add a space for single-digit dates.
Change-Id: Ib3bac8a16bc2d1fcb26ab3bb7ad172b89e1a4a24
Reviewed-on: https://go-review.googlesource.com/75230
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/time/example_test.go')
-rw-r--r-- | src/time/example_test.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/time/example_test.go b/src/time/example_test.go index 98a2d532a3..34df8daef2 100644 --- a/src/time/example_test.go +++ b/src/time/example_test.go @@ -238,10 +238,10 @@ func ExampleTime_Format() { // value. do("No pad", "<2>", "<7>") - // An underscore represents a zero pad, if required. + // An underscore represents a space pad, if the date only has one digit. do("Spaces", "<_2>", "< 7>") - // Similarly, a 0 indicates zero padding. + // A "0" indicates zero padding for single-digit values. do("Zeros", "<02>", "<07>") // If the value is already the right width, padding is not used. |