mirror of
https://github.com/restic/restic.git
synced 2025-08-22 19:58:09 +00:00
simpler error return
This commit is contained in:
@@ -24,10 +24,6 @@ func RunWorkers(ctx context.Context, count int, workerFunc func() error, finalFu
|
||||
// make sure finalFunc is run
|
||||
finalFunc()
|
||||
|
||||
// if the workers returned an error, return it to the caller
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
// return error from workers to the caller
|
||||
return err
|
||||
}
|
||||
|
Reference in New Issue
Block a user