Open n4x2 opened 1 year ago
Usually "Deprecated" just means it's finally stable ;)
But I'll check what the recommendation is these days.
pkg/pwgen/rand.go
This one can Go away once we don't need to support Go 1.20 anymore.pkg/fsutil/fsutil.go
Same here.For the test files we actually rely on detemernistic output, so we will need some more changes. We need to introduce a global variable with a local generator and seed it like this New(NewSource(seed))
. See https://pkg.go.dev/math/rand#Seed
@dominikschulz Hi, I'd like to take on this issue if that's okay.
@orangekame3 Feel free to do so
@dominikschulz Thank you. I've created a PR. Please check it out: https://github.com/gopasspw/gopass/pull/2675
Hello @dominikschulz !
I see the last pull request on this issue is from last year, but I see the good-first-issue
tag.
Do you mind if I open my own PR?
@lhardt Please go ahead. It should be as simple as taking the previous PR and fixing the merge conflicts and then doing the changes that were requested in there if you want. Or you can try and do it your way too if you have another idea to do it.
Summary
Since Go 1.20 release, math/rand.Seed is marked "Deprecated"
Looks like five instances to consider updating: