Fix noinlineerr findings: internal/storage (refs #61)
This commit is contained in:
@@ -63,7 +63,8 @@ func (f *FileStorer) Put(ctx context.Context, key string, data io.Reader) error
|
||||
}
|
||||
defer func() { _ = file.Close() }()
|
||||
|
||||
if _, err := io.Copy(file, data); err != nil {
|
||||
_, err = io.Copy(file, data)
|
||||
if err != nil {
|
||||
return fmt.Errorf("writing file: %w", err)
|
||||
}
|
||||
|
||||
@@ -92,7 +93,8 @@ func (f *FileStorer) PutWithProgress(ctx context.Context, key string, data io.Re
|
||||
callback: progress,
|
||||
}
|
||||
|
||||
if _, err := io.Copy(pw, data); err != nil {
|
||||
_, err = io.Copy(pw, data)
|
||||
if err != nil {
|
||||
return fmt.Errorf("writing file: %w", err)
|
||||
}
|
||||
|
||||
|
||||
@@ -155,7 +155,8 @@ func (r *RcloneStorer) Delete(ctx context.Context, key string) error {
|
||||
return fmt.Errorf("getting object: %w", err)
|
||||
}
|
||||
|
||||
if err := obj.Remove(ctx); err != nil {
|
||||
err = obj.Remove(ctx)
|
||||
if err != nil {
|
||||
return fmt.Errorf("removing object: %w", err)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user