Skip to content

x/website: release notes for Go 1.22 mentions inexistent math/rand/v2.Uint() #66693

@rhcarvalho

Description

@rhcarvalho

Go version

go version go1.22.2 linux/amd64

Output of go env in your module/workspace:

N/A

What did you do?

Read release notes at https://go.dev/doc/go1.22, highlights are mine:

The Intn, Int31, Int31n, Int63, and Int64n top-level functions and methods from math/rand are spelled more idiomatically in math/rand/v2: IntN, Int32, Int32N, Int64, and Int64N. There are also new top-level functions and methods Uint32, Uint32N, Uint64, Uint64N, Uint, and UintN.

What did you see happen?

Tried to use math/rand/v2.Uint, got a compilation error and realized it doesn't exist, and looking at the CLs that added math/rand/v2 it is possible it never existed, even tough it is mentioned in the original proposal.

What did you expect to see?

Either the release notes are wrong or the new package is missing intended functionality.

Metadata

Metadata

Assignees

Labels

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

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions