mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
inverse if
This commit is contained in:
parent
da199846d2
commit
5b3ad0023b
1 changed files with 3 additions and 2 deletions
5
api.go
5
api.go
|
@ -63,10 +63,11 @@ func getBoolParam(value string) (bool, error) {
|
|||
if value == "" {
|
||||
return false, nil
|
||||
}
|
||||
if ret, err := strconv.ParseBool(value); err == nil {
|
||||
if ret, err := strconv.ParseBool(value); err != nil {
|
||||
return false, fmt.Errorf("Bad parameter")
|
||||
} else {
|
||||
return ret, err
|
||||
}
|
||||
return false, fmt.Errorf("Bad parameter")
|
||||
}
|
||||
|
||||
func getAuth(srv *Server, version float64, w http.ResponseWriter, r *http.Request, vars map[string]string) error {
|
||||
|
|
Loading…
Add table
Reference in a new issue