Browse Source

consistent codebase fix

Victor Vieux 12 years ago
parent
commit
1581ed52ba
1 changed files with 3 additions and 3 deletions
  1. 3 3
      api.go

+ 3 - 3
api.go

@@ -63,11 +63,11 @@ func getBoolParam(value string) (bool, error) {
 	if value == "" {
 		return false, nil
 	}
-	if ret, err := strconv.ParseBool(value); err != nil {
+	ret, err := strconv.ParseBool(value)
+	if err != nil {
 		return false, fmt.Errorf("Bad parameter")
-	} else {
-		return ret, err
 	}
+	return ret, nil
 }
 
 func getAuth(srv *Server, version float64, w http.ResponseWriter, r *http.Request, vars map[string]string) error {