You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In src/time/example_test.go::ExampleParseDuration, visible at the earlier mentioned link:
fmt.Printf("There are %6.2e seconds in %v.\n", micro2.Seconds(), micro)
What did you expect to see?
fmt.Printf("There are %6.2e seconds in %v.\n", micro2.Seconds(), micro2)
Note micro -> micro2 in case the change isn't immediately apparent. Or perhaps the idea was to have micro as both. The two values are effectively the same, so nbd, but ... seems like the docs should be consistent in that regard.
The text was updated successfully, but these errors were encountered:
A typo without consequences, but confusing nonetheless. The last
line prints micro2 and then micro, instead of micro2 twice.
One-character fix.
Fixesgolang#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>
Go version
go version go1.21.6 linux/amd64
Output of
go env
in your module/workspace:What did you do?
Navigate to https://pkg.go.dev/time#ParseDuration and expand the "Example" sub-link.
What did you see happen?
In src/time/example_test.go::ExampleParseDuration, visible at the earlier mentioned link:
What did you expect to see?
Note
micro
->micro2
in case the change isn't immediately apparent. Or perhaps the idea was to havemicro
as both. The two values are effectively the same, so nbd, but ... seems like the docs should be consistent in that regard.The text was updated successfully, but these errors were encountered: