Seed the math/rand generator from the time

This commit is contained in:
Bryan Boreham committed 2015-07-03 13:39:47 +01:00
1 parent fcea6fcbf8
commit 8c6c692926
1 file changed
+5
+5
View File
@@ -10,6 +10,7 @@ import (
"io"
"math/rand"
"sort"
"time"
"github.com/weaveworks/weave/common"
"github.com/weaveworks/weave/ipam/address"
@@ -518,3 +519,7 @@ func (r *Ring) PeerNames() map[router.PeerName]struct{} {
return res
}
func init() {
rand.Seed(time.Now().UTC().UnixNano())
}