From 9a0299ea524e008a7155e16bf641fbb6480216a1 Mon Sep 17 00:00:00 2001 From: Franciszek Walkowiak Date: Fri, 19 Jan 2024 11:51:48 +0100 Subject: [PATCH] Fix --- cmd/mirror.go | 2 +- cmd/utils.go | 6 ------ 2 files changed, 1 insertion(+), 7 deletions(-) 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) - } -}