mirror of
https://github.com/restic/restic.git
synced 2024-12-23 08:16:36 +00:00
simpler error return
This commit is contained in:
parent
da48b925ff
commit
38ddfbc4d3
1 changed files with 2 additions and 6 deletions
|
@ -24,10 +24,6 @@ func RunWorkers(ctx context.Context, count int, workerFunc func() error, finalFu
|
||||||
// make sure finalFunc is run
|
// make sure finalFunc is run
|
||||||
finalFunc()
|
finalFunc()
|
||||||
|
|
||||||
// if the workers returned an error, return it to the caller
|
// return error from workers to the caller
|
||||||
if err != nil {
|
return err
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue