Closed vazha closed 5 years ago
rand not used properly in crm.go id = append(id, keyspace[rand.Intn(len(keyspace))]) always produced the same sequence.
Can be used as follow: s := rand.NewSource(time.Now().UnixNano()) r := rand.New(s) id = append(id, keyspace[r.Intn(len(keyspace))])
Ok thanks. Wanna make a PR?
Best regards,
schmorrison
Closed by #17
rand not used properly in crm.go id = append(id, keyspace[rand.Intn(len(keyspace))]) always produced the same sequence.
Can be used as follow: s := rand.NewSource(time.Now().UnixNano()) r := rand.New(s) id = append(id, keyspace[r.Intn(len(keyspace))])