jldb/fstore/test_util.go
2023-10-13 11:43:27 +02:00

17 lines
271 B
Go

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)
}