On Wed, Jun 26, 2019 at 8:18 PM Chou Yan <yan.chou.str...@gmail.com> wrote:
> I fix it by : > > var w = weighted.NewRandW() > Insufficient context to understand what that does. Let alone how it "fixes" the problem since you haven't shown us your `NewRandW()` function. In general you should never initialize a RNG more than once unless you are doing so to create a reproducible sequence of values. In which case you should be initializing it with a constant value rather than a pseudo-random value like `time.Now().Unix()`. -- Kurtis Rader Caretaker of the exceptional canines Junior and Hank -- 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/CABx2%3DD9oc7vzsQXr9GYiefB15Xu%3D-kJ%3DLQESqRWBLq_rNUQeOg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.