Sign in
fuchsia
/
third_party
/
github.com
/
moby
/
moby
/
refs/tags/v0.7.0-rc5
/
.
/
utils
/
random.go
blob: d4d33c690abaa5d788f5648c38b977ecd231c78b [
file
] [
log
] [
blame
]
package utils
import (
"crypto/rand"
"encoding/hex"
"io"
)
func RandomString() string {
id := make([]byte, 32)
_, err := io.ReadFull(rand.Reader, id)
if err != nil {
panic(err)
// This shouldn't happen
}
return hex.EncodeToString(id)
}