Browse code

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)

Levi Gross authored on 2014/06/10 23:02:00
Showing 1 changed files
... ...
@@ -8,8 +8,8 @@ import (
8 8
 
9 9
 func RandomString() string {
10 10
 	id := make([]byte, 32)
11
-	_, err := io.ReadFull(rand.Reader, id)
12
-	if err != nil {
11
+
12
+	if _, err := io.ReadFull(rand.Reader, id); err != nil {
13 13
 		panic(err) // This shouldn't happen
14 14
 	}
15 15
 	return hex.EncodeToString(id)