filestore: Remove useless defer (#318)
Since the `file` is not used after the creation, its closing can be done without defer (and the err can be checked).
This commit is contained in:
parent
d6ac521667
commit
e138fc3e9e
|
@ -65,7 +65,10 @@ func (store FileStore) NewUpload(ctx context.Context, info handler.FileInfo) (ha
|
|||
}
|
||||
return nil, err
|
||||
}
|
||||
defer file.Close()
|
||||
err = file.Close()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
upload := &fileUpload{
|
||||
info: info,
|
||||
|
|
Loading…
Reference in New Issue