Skip to content

drop deprecated rand.Seed call in main#70

Open
c-tonneslan wants to merge 1 commit into
mingrammer:mainfrom
c-tonneslan:fix/drop-deprecated-rand-seed
Open

drop deprecated rand.Seed call in main#70
c-tonneslan wants to merge 1 commit into
mingrammer:mainfrom
c-tonneslan:fix/drop-deprecated-rand-seed

Conversation

@c-tonneslan

Copy link
Copy Markdown

math/rand has been auto-seeded since Go 1.20 and `rand.Seed` is now deprecated. go.mod already requires go 1.20 so the manual seed at the top of `main` is dead code, and gopls picks it up as deprecated.

math/rand has self-seeded automatically since Go 1.20, so the manual
rand.Seed(time.Now().UnixNano()) at the top of main is a no-op. go.mod
already requires go 1.20 so we can just delete it.

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.

1 participant