2022-08-15 06:16:22 +00:00
|
|
|
package redirector
|
2022-04-02 18:35:46 +00:00
|
|
|
|
|
|
|
import "math/rand"
|
|
|
|
|
|
|
|
var letters = []rune("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ")
|
|
|
|
|
2022-08-15 06:16:22 +00:00
|
|
|
func RandomSequence(n int) string {
|
2022-04-02 18:35:46 +00:00
|
|
|
b := make([]rune, n)
|
|
|
|
for i := range b {
|
|
|
|
b[i] = letters[rand.Intn(len(letters))]
|
|
|
|
}
|
|
|
|
return string(b)
|
|
|
|
}
|