build: fix problems found with golint

This commit is contained in:
Nick Craig-Wood 2019-01-11 16:57:05 +00:00
parent 6b3a9bf26a
commit 8d5d332daf
2 changed files with 7 additions and 9 deletions

View file

@ -1632,15 +1632,13 @@ func (r *run) getCacheFs(f fs.Fs) (*cache.Fs, error) {
cfs, ok := f.(*cache.Fs)
if ok {
return cfs, nil
} else {
if f.Features().UnWrap != nil {
cfs, ok := f.Features().UnWrap().(*cache.Fs)
if ok {
return cfs, nil
}
}
if f.Features().UnWrap != nil {
cfs, ok := f.Features().UnWrap().(*cache.Fs)
if ok {
return cfs, nil
}
}
return nil, errors.New("didn't found a cache fs")
}