aboutsummaryrefslogtreecommitdiff
path: root/src/time
diff options
context:
space:
mode:
authorRob Pike <r@golang.org>2024-02-12 11:35:29 +1100
committerRob Pike <r@golang.org>2024-02-13 01:05:00 +0000
commit0336d5eb43f1269060b3e89b4d4e2c0f527cfe4f (patch)
tree21907517b62539bbda2564f305157ea49f0d8eda /src/time
parent718dc025e7b2cdef26c6a5f3d5c2645885ef44a5 (diff)
downloadgo-0336d5eb43f1269060b3e89b4d4e2c0f527cfe4f.tar.gz
go-0336d5eb43f1269060b3e89b4d4e2c0f527cfe4f.zip
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>
Diffstat (limited to 'src/time')
-rw-r--r--src/time/example_test.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/time/example_test.go b/src/time/example_test.go
index cfdee8f4d7..53c20a0516 100644
--- a/src/time/example_test.go
+++ b/src/time/example_test.go
@@ -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