mirror of https://github.com/perkeep/perkeep.git
Use switch, not ifs.
This commit is contained in:
parent
d81d6211d5
commit
4df8d2ba04
|
@ -45,14 +45,15 @@ func (ds *diskStorage) Remove(partition string, blobs []*blobref.BlobRef) os.Err
|
||||||
for _, blob := range blobs {
|
for _, blob := range blobs {
|
||||||
fileName := PartitionBlobFileName(partition, blob)
|
fileName := PartitionBlobFileName(partition, blob)
|
||||||
err := os.Remove(fileName)
|
err := os.Remove(fileName)
|
||||||
if err == nil {
|
switch {
|
||||||
continue;
|
case err == nil:
|
||||||
}
|
continue
|
||||||
if errorIsNoEnt(err) {
|
case errorIsNoEnt(err):
|
||||||
log.Printf("Deleting already-deleted file; harmless.")
|
log.Printf("Deleting already-deleted file; harmless.")
|
||||||
continue
|
continue
|
||||||
|
default:
|
||||||
|
return err
|
||||||
}
|
}
|
||||||
return err
|
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue