From 0336d5eb43f1269060b3e89b4d4e2c0f527cfe4f Mon Sep 17 00:00:00 2001 From: Rob Pike Date: Mon, 12 Feb 2024 11:35:29 +1100 Subject: [PATCH] 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 --- src/time/example_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.48.1