i was digging in the rand package and came across NewSource(seed) in the randpackage which creates a new source in case you don't want the global source set by the package. It returns a Source interface. For some reason, there's a seed method on the Source as well for which Rand implements, where you pass the seed value. But in the NewSource implementation, there's an rng.Seed() which gets called. Is there a reason why these two seed() calls are necessary and if so, anyone know the difference? https://github.com/golang/go/blob/master/src/math/rand/rand.go (edited)
-- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/458b100c-dd01-4521-b391-a80117239f8dn%40googlegroups.com.