mirror of
https://github.com/minio/minio.git
synced 2025-11-09 21:49:46 -05:00
minor cleanup
- Reused contains() from utils.go at a couple of places - Cleanup in return statements and boolean checks
This commit is contained in:
committed by
Harshavardhana
parent
ec4260d260
commit
418921de89
@@ -137,11 +137,10 @@ func (m xlMetaV1) IsValid() bool {
|
||||
}
|
||||
|
||||
// ObjectPartIndex - returns the index of matching object part number.
|
||||
func (m xlMetaV1) ObjectPartIndex(partNumber int) (index int) {
|
||||
func (m xlMetaV1) ObjectPartIndex(partNumber int) int {
|
||||
for i, part := range m.Parts {
|
||||
if partNumber == part.Number {
|
||||
index = i
|
||||
return index
|
||||
return i
|
||||
}
|
||||
}
|
||||
return -1
|
||||
|
||||
Reference in New Issue
Block a user