Hi, I've looked through the PRs and found that you've been working on solve the unsafe random number generator before. However, the problem still exists as:
func generate(lang, cat string, fallback bool) string {
format := lookup(lang, cat+"_format", fallback)
var result string
for _, ru := range format {
if ru != '#' {
result += string(ru)
} else {
result += strconv.Itoa(r.Intn(10))
}
}
return result
}
this function still remains using a global random number generator, which is unsafe if it's called concurrently. So I propose this PR to fix the problem.
Hi, I've looked through the PRs and found that you've been working on solve the unsafe random number generator before. However, the problem still exists as:
this function still remains using a global random number generator, which is unsafe if it's called concurrently. So I propose this PR to fix the problem.