schmorrison / Zoho

Golang API for Zoho services

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

rand not used properly

vazha opened this issue · comments

commented

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