From: Rob Pike Date: Mon, 12 Feb 2024 00:35:29 +0000 (+1100) Subject: time: fix typo in ExampleParseDuration X-Git-Tag: go1.23rc1~1241 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=0336d5eb43f1269060b3e89b4d4e2c0f527cfe4f;p=gostls13.git 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 Reviewed-by: Than McIntosh Run-TryBot: Rob Pike TryBot-Result: Gopher Robot --- 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