1
0
Fork 0
mirror of https://github.com/restic/restic.git synced 2024-12-23 00:07:25 +00:00

simpler error return

This commit is contained in:
Alexander Bruyako 2020-01-27 18:41:46 +03:00
parent da48b925ff
commit 38ddfbc4d3

View file

@ -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 error from workers to the caller
return err
}
return nil
}