initial commit
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
package common
|
||||
|
||||
import "math/rand"
|
||||
|
||||
var allSeq [62]rune
|
||||
|
||||
func Random(n int) string {
|
||||
runes := make([]rune, n)
|
||||
for i := 0; i < n; i++ {
|
||||
runes[i] = allSeq[rand.Intn(len(allSeq))]
|
||||
}
|
||||
return string(runes)
|
||||
}
|
||||
Reference in New Issue
Block a user