cleanup: All conditionals simplified under pkg. (#3875)

Address all the changes reported/recommended by
`gosimple` tool.
This commit is contained in:
Harshavardhana
2017-03-09 10:13:30 -08:00
committed by GitHub
parent 43317530d5
commit 85cbd875fc
5 changed files with 8 additions and 21 deletions

View File

@@ -1,5 +1,5 @@
/*
* Minio Cloud Storage, (C) 2016 Minio, Inc.
* Minio Cloud Storage, (C) 2016, 2017 Minio, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -276,12 +276,7 @@ func (c AdminClient) dumpHTTP(req *http.Request, resp *http.Response) error {
// Ends the http dump.
_, err = fmt.Fprintln(c.traceOutput, "---------END-HTTP---------")
if err != nil {
return err
}
// Returns success.
return nil
return err
}
// do - execute http request.

View File

@@ -211,10 +211,7 @@ func (adm *AdminClient) listObjectsHeal(bucket, prefix, marker, delimiter string
}
err = xml.NewDecoder(resp.Body).Decode(&toBeHealedObjects)
if err != nil {
return toBeHealedObjects, err
}
return toBeHealedObjects, nil
return toBeHealedObjects, err
}
// ListObjectsHeal - Lists upto maxKeys objects that needing heal matching bucket, prefix, marker, delimiter.