Skip to content

drop deprecated rand.Seed init hook#24

Open
c-tonneslan wants to merge 1 commit into
go-task:masterfrom
c-tonneslan:fix/drop-deprecated-rand-seed
Open

drop deprecated rand.Seed init hook#24
c-tonneslan wants to merge 1 commit into
go-task:masterfrom
c-tonneslan:fix/drop-deprecated-rand-seed

Conversation

@c-tonneslan

Copy link
Copy Markdown

Closes #22.

`math/rand` self-seeds with a random value as of Go 1.20, and the deprecation notice on `rand.Seed` says basically "don't bother calling this anymore." go.mod already requires go 1.20 so the init hook is dead weight, and gopls is now flagging it as deprecated.

math/rand has self-seeded with a random value since Go 1.20, and the
deprecation note for rand.Seed says exactly that. The package already
requires go 1.20 in go.mod, so the init hook is dead weight and
gopls flags it as deprecated.

Closes Masterminds#22

Signed-off-by: Charlie Tonneslan <cst0520@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

rand.Seed is deprecated in Go 1.20

1 participant