jldb/fstore/test_util.go

17 lines
271 B
Go
Raw Normal View History

2023-10-13 09:43:27 +00:00
package fstore
import (
crand "crypto/rand"
"encoding/base32"
"math/rand"
)
func randString() string {
size := 8 + rand.Intn(92)
buf := make([]byte, size)
if _, err := crand.Read(buf); err != nil {
panic(err)
}
return base32.StdEncoding.EncodeToString(buf)
}