1
0
forked from MTSR/mapserver
mapserver/server/app/util.go
NatureFreshMilk ea7a938b40 util
2019-01-29 18:00:00 +01:00

21 lines
331 B
Go

package app
import (
"math/rand"
"time"
)
func init() {
rand.Seed(time.Now().UnixNano())
}
var letterRunes = []rune("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ")
func RandStringRunes(n int) string {
b := make([]rune, n)
for i := range b {
b[i] = letterRunes[rand.Intn(len(letterRunes))]
}
return string(b)
}