From bef7d7d621941c4c0e83ecd6a86be0d0ac99c4d3 Mon Sep 17 00:00:00 2001 From: Levi Gross Date: Tue, 10 Jun 2014 10:02:00 -0400 Subject: [PATCH] Fixed up if statement Signed-off-by: Levi Gross Docker-DCO-1.1-Signed-off-by: Levi Gross (github: levigross) Upstream-commit: a7b60b21deaf7dbc3b5741be036bfb2a6679f1c8 Component: engine --- components/engine/utils/random.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/engine/utils/random.go b/components/engine/utils/random.go index d4d33c690a..907f28eec3 100644 --- a/components/engine/utils/random.go +++ b/components/engine/utils/random.go @@ -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)