16 lines
234 B
Go
16 lines
234 B
Go
|
package mdb
|
||
|
|
||
|
import (
|
||
|
"crypto/rand"
|
||
|
"encoding/hex"
|
||
|
mrand "math/rand"
|
||
|
)
|
||
|
|
||
|
func randString() string {
|
||
|
buf := make([]byte, 1+mrand.Intn(10))
|
||
|
if _, err := rand.Read(buf); err != nil {
|
||
|
panic(err)
|
||
|
}
|
||
|
return hex.EncodeToString(buf)
|
||
|
}
|