Remove deprecated method. (#2481)

This commit is contained in:
Tingluo Huang 2023-04-04 15:15:11 -04:00 committed by GitHub
parent 8fa4520376
commit 56754094ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 5 deletions

View File

@ -5,17 +5,17 @@ import (
"time"
)
func init() {
rand.Seed(time.Now().UnixNano())
}
const letterBytes = "abcdefghijklmnopqrstuvwxyz"
var (
random = rand.New(rand.NewSource(time.Now().UnixNano()))
)
// Copied from https://stackoverflow.com/a/31832326 with thanks
func RandStringBytesRmndr(n int) string {
b := make([]byte, n)
for i := range b {
b[i] = letterBytes[rand.Int63()%int64(len(letterBytes))]
b[i] = letterBytes[random.Int63()%int64(len(letterBytes))]
}
return string(b)
}