mirror of
https://github.com/golang/go
synced 2024-11-26 17:56:55 -07:00
time: fix typo in ExampleParseDuration
A typo without consequences, but confusing nonetheless. The last line prints micro2 and then micro, instead of micro2 twice. One-character fix. Fixes #65666 Change-Id: I61d636382a2223d53eac58d6ddbcc7c15b4efc85 Reviewed-on: https://go-review.googlesource.com/c/go/+/563275 Reviewed-by: Ian Lance Taylor <iant@google.com> Reviewed-by: Than McIntosh <thanm@google.com> Run-TryBot: Rob Pike <r@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org>
This commit is contained in:
parent
718dc025e7
commit
0336d5eb43
@ -99,7 +99,7 @@ func ExampleParseDuration() {
|
||||
fmt.Println(complex)
|
||||
fmt.Printf("There are %.0f seconds in %v.\n", complex.Seconds(), complex)
|
||||
fmt.Printf("There are %d nanoseconds in %v.\n", micro.Nanoseconds(), micro)
|
||||
fmt.Printf("There are %6.2e seconds in %v.\n", micro2.Seconds(), micro)
|
||||
fmt.Printf("There are %6.2e seconds in %v.\n", micro2.Seconds(), micro2)
|
||||
// Output:
|
||||
// 10h0m0s
|
||||
// 1h10m10s
|
||||
|
Loading…
Reference in New Issue
Block a user