Browse Source

Merge pull request #6335 from levigross/master

Fixed up if statement
Michael Crosby 11 years ago
parent
commit
9ac293e1a8
1 changed files with 2 additions and 2 deletions
  1. 2 2
      utils/random.go

+ 2 - 2
utils/random.go

@@ -8,8 +8,8 @@ import (
 
 
 func RandomString() string {
 func RandomString() string {
 	id := make([]byte, 32)
 	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
 		panic(err) // This shouldn't happen
 	}
 	}
 	return hex.EncodeToString(id)
 	return hex.EncodeToString(id)