This repository has been archived on 2022-07-30. You can view files and clone it, but cannot push or open issues/pull-requests.
mdb/kvstore/util_test.go

22 lines
299 B
Go

package kvstore
import (
"crypto/rand"
"encoding/hex"
mrand "math/rand"
)
func _b(in string) []byte {
return []byte(in)
}
func randString() string {
buf := make([]byte, 1+mrand.Intn(20))
rand.Read(buf)
return hex.EncodeToString(buf)
}
func randBytes() []byte {
return _b(randString())
}