func RandomString(length int) string {
	buf := make([]byte, length)
	if _, err := rand.Read(buf); err != nil {
		panic(err)
	}
	return base64.StdEncoding.EncodeToString(buf)
}
RandomString returns a string by specified length of random chars(base64)
package util
import (
	"crypto/rand"
	"encoding/base64"
	mrand "math/rand"
	"time"
)
func init() {
	mrand.Seed(time.Now().UnixNano())
}