File tree Expand file tree Collapse file tree 3 files changed +6
-17
lines changed
Expand file tree Collapse file tree 3 files changed +6
-17
lines changed Original file line number Diff line number Diff line change @@ -56,7 +56,10 @@ Desktop.ini
5656
5757mirroring.json
5858go.sum
59+ republisher.sh
60+
61+ # Reports files
5962sonar-project.properties
6063unit-tests.xml
6164coverage.out
62- republisher.sh
65+ .scannerwork /
Original file line number Diff line number Diff line change 88
99 "gitlab-sync/internal/mirroring"
1010 "gitlab-sync/internal/utils"
11- "gitlab-sync/pkg/helpers"
1211
1312 "github.com/spf13/cobra"
1413 "go.uber.org/zap"
@@ -59,14 +58,14 @@ func main() {
5958 zap .L ().Debug ("Parsing mirror mapping file" )
6059 mapping , mappingErrors := utils .OpenMirrorMapping (mirrorMappingPath )
6160 if mappingErrors != nil {
62- zap .L ().Fatal ("Error opening mirror mapping file" , zap .Array ("errors" , helpers . ErrorArray ( mappingErrors ) ))
61+ zap .L ().Fatal ("Error opening mirror mapping file" , zap .Errors ("errors" , mappingErrors ))
6362 }
6463 zap .L ().Debug ("Mirror mapping file parsed successfully" )
6564 args .MirrorMapping = mapping
6665
6766 mirroringErrors := mirroring .MirrorGitlabs (& args )
6867 if mirroringErrors != nil {
69- zap .L ().Error ("Error during mirroring process" , zap .Array ("errors" , helpers . ErrorArray ( mirroringErrors ) ))
68+ zap .L ().Error ("Error during mirroring process" , zap .Errors ("errors" , mirroringErrors ))
7069 }
7170 zap .L ().Info ("Mirroring completed" )
7271 },
Original file line number Diff line number Diff line change @@ -2,8 +2,6 @@ package helpers
22
33import (
44 "fmt"
5-
6- "go.uber.org/zap/zapcore"
75)
86
97// MergeErrors collects any number of errors from various inputs:
@@ -74,14 +72,3 @@ func MergeErrors(input any) []error {
7472 }
7573 return merged
7674}
77-
78- type ErrorArray []error
79-
80- func (ea ErrorArray ) MarshalLogArray (enc zapcore.ArrayEncoder ) error {
81- for _ , err := range ea {
82- if err != nil {
83- enc .AppendString (err .Error ())
84- }
85- }
86- return nil
87- }
You can’t perform that action at this time.
0 commit comments