Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Liu <jliu@gitlab.com>2023-12-08 04:21:34 +0300
committerJames Liu <jliu@gitlab.com>2023-12-18 03:23:13 +0300
commitcb57a73f569aa3a8b34956f47e32b534d62599cd (patch)
treee0325154721e1b84727feb5bb0f245b84eb9381b
parent3c1d745a3216187bdf6a30ae52639b4488ae3dbb (diff)
backup: Unexport pipelineErrors
It's not used outside of the backup package.
-rw-r--r--internal/backup/pipeline.go10
-rw-r--r--internal/backup/pipeline_test.go2
2 files changed, 6 insertions, 6 deletions
diff --git a/internal/backup/pipeline.go b/internal/backup/pipeline.go
index a734a1382..65094788c 100644
--- a/internal/backup/pipeline.go
+++ b/internal/backup/pipeline.go
@@ -124,11 +124,11 @@ func (cmd RestoreCommand) Execute(ctx context.Context) error {
return cmd.strategy.Restore(ctx, &cmd.request)
}
-// PipelineErrors represents a summary of errors by repository
-type PipelineErrors []error
+// pipelineErrors represents a summary of errors by repository
+type pipelineErrors []error
// AddError adds an error associated with a repository to the summary.
-func (e *PipelineErrors) AddError(repo *gitalypb.Repository, err error) {
+func (e *pipelineErrors) AddError(repo *gitalypb.Repository, err error) {
if repo.GetGlProjectPath() != "" {
err = fmt.Errorf("%s (%s): %w", repo.GetRelativePath(), repo.GetGlProjectPath(), err)
} else {
@@ -137,7 +137,7 @@ func (e *PipelineErrors) AddError(repo *gitalypb.Repository, err error) {
*e = append(*e, err)
}
-func (e PipelineErrors) Error() string {
+func (e pipelineErrors) Error() string {
var builder strings.Builder
_, _ = fmt.Fprintf(&builder, "%d failures encountered:\n", len(e))
for _, err := range e {
@@ -154,7 +154,7 @@ type contextCommand struct {
// Pipeline is a pipeline that executes commands in parallel
type Pipeline struct {
log log.Logger
- errs PipelineErrors
+ errs pipelineErrors
parallel int
parallelStorage int
diff --git a/internal/backup/pipeline_test.go b/internal/backup/pipeline_test.go
index deb31c7d0..bb25a4179 100644
--- a/internal/backup/pipeline_test.go
+++ b/internal/backup/pipeline_test.go
@@ -273,7 +273,7 @@ func TestPipelineError(t *testing.T) {
},
} {
t.Run(tc.name, func(t *testing.T) {
- err := PipelineErrors{}
+ err := pipelineErrors{}
for _, repo := range tc.repos {
err.AddError(repo, assert.AnError)