minor cleanup

- Reused contains() from utils.go at a couple of places
- Cleanup in return statements and boolean checks
This commit is contained in:
Mohit Agarwal
2016-08-16 20:27:14 +05:30
committed by Harshavardhana
parent ec4260d260
commit 418921de89
10 changed files with 20 additions and 51 deletions
+1 -3
View File
@@ -268,9 +268,7 @@ func (api objectAPIHandlers) CopyObjectHandler(w http.ResponseWriter, r *http.Re
}
// Skip the first element if it is '/', split the rest.
if strings.HasPrefix(objectSource, "/") {
objectSource = objectSource[1:]
}
objectSource = strings.TrimPrefix(objectSource, "/")
splits := strings.SplitN(objectSource, "/", 2)
// Save sourceBucket and sourceObject extracted from url Path.