Skip to content

time: ParseDuration example bug #65666

@imirkin

Description

@imirkin

Go version

go version go1.21.6 linux/amd64

Output of go env in your module/workspace:

N/A

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:

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.

Metadata

Metadata

Assignees

Labels

DocumentationIssues describing a change to documentation.FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions