Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rand.Seed is deprecated #72

Open
lublak opened this issue Oct 24, 2024 · 2 comments · May be fixed by #73
Open

rand.Seed is deprecated #72

lublak opened this issue Oct 24, 2024 · 2 comments · May be fixed by #73

Comments

@lublak
Copy link

lublak commented Oct 24, 2024

currently we can use

rand.Seed(seed)

to set an seed for a HappyPalette.
Go says:

rand.Seed is deprecated ...... should use New(NewSource(seed))

At the moment it doesn't matter as long as there is still the possibility.
I think something like that would be practical:

colorful.FastHappyPalette(3)
// with custom seed:
colorful.FastHappyPaletteWithRand(3, rand.New(rand.NewSource(seed)))
@makew0rld
Copy link
Collaborator

Fair enough. I would accept a PR for this.

@lublak lublak linked a pull request Oct 24, 2024 that will close this issue
@lublak
Copy link
Author

lublak commented Nov 6, 2024

@makew0rld i created a pull request for this: #73

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants