Fixed up if statement
Signed-off-by: Levi Gross <levi@levigross.com> Docker-DCO-1.1-Signed-off-by: Levi Gross <levi@levigross.com> (github: levigross) Upstream-commit: a7b60b21deaf7dbc3b5741be036bfb2a6679f1c8 Component: engine
This commit is contained in:
@@ -8,8 +8,8 @@ import (
|
||||
|
||||
func RandomString() string {
|
||||
id := make([]byte, 32)
|
||||
_, err := io.ReadFull(rand.Reader, id)
|
||||
if err != nil {
|
||||
|
||||
if _, err := io.ReadFull(rand.Reader, id); err != nil {
|
||||
panic(err) // This shouldn't happen
|
||||
}
|
||||
return hex.EncodeToString(id)
|
||||
|
||||
Reference in New Issue
Block a user