I am studying go just now.
I an example I've this line
rand.Seed(SEED)
But the vscode extension about go is telling me
rand.Seed has been deprecated since Go 1.20 and an alternative has been available since Go 1.0: Programs that call Seed and then expect a specific sequence of results from the global random source (using functions such as Int) can be broken when a dependency changes how much it consumes from the global random source. To avoid such breakages, programs that need a specific result sequence should use NewRand(NewSource(seed)) to obtain a random generator that other packages cannot access. (SA1019)
I cannot understand how to use NewRand(NewSource(seed))
as suggested.
I found doc about NewSource https://pkg.go.dev/math/rand#NewSource
But there is not doc about a NewRand
function
What is the new reccomended equivalent of rand.Seed(SEED)
?