diff --git a/cmd/mirror.go b/cmd/mirror.go index 954e429..3f2d104 100644 --- a/cmd/mirror.go +++ b/cmd/mirror.go @@ -336,7 +336,7 @@ results_receiver_loop: case msg := <-messages: receivedResults++ log.Info("Finished mirroring ", receivedResults, " out of ", len(repos), " repositories.") - combineSlices(msg.Errors, &allErrors) + allErrors = append(allErrors, msg.Errors...) if lastCloneEnd.Before(msg.LastCloneEnd) { lastCloneEnd = msg.LastCloneEnd } diff --git a/cmd/utils.go b/cmd/utils.go index f2267ed..d2a2b2d 100644 --- a/cmd/utils.go +++ b/cmd/utils.go @@ -33,9 +33,3 @@ func stringInSlice(a string, list []string) bool { } return false } - -func combineSlices(slice []string, allSlices *[]string) { - for _, s := range slice { - *allSlices = append(*allSlices, s) - } -}