Code cleanup - simplify server side code. (#3870)

Fix all the issues reported by `gosimple` tool.
This commit is contained in:
Harshavardhana
2017-03-08 10:00:47 -08:00
committed by GitHub
parent 433225ab0d
commit 47ac410ab0
14 changed files with 21 additions and 52 deletions

View File

@@ -1690,9 +1690,7 @@ func removeDiskN(disks []string, n int) {
// Makes a entire new copy of a StorageAPI slice.
func deepCopyStorageDisks(storageDisks []StorageAPI) []StorageAPI {
newStorageDisks := make([]StorageAPI, len(storageDisks))
for i, disk := range storageDisks {
newStorageDisks[i] = disk
}
copy(newStorageDisks, storageDisks)
return newStorageDisks
}