for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
////////////////////////////////////////////////////////////////////////////////
// Author: Nikita Koryabkin
// Email: [email protected]
// Telegram: https://t.me/Apologiz
package util
import (
"math/rand"
"time"
)
func init() {
rand.Seed(time.Now().UnixNano())
}
var letterRunes = []rune("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ")
//RandString returns random string
func RandString(n int) string {
b := make([]rune, n)
for i := range b {
b[i] = letterRunes[rand.Intn(len(letterRunes))]
return string(b)