mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
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)
This commit is contained in:
parent
fd32fc8062
commit
a7b60b21de
1 changed files with 2 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue