diff options
author | James Liu <jliu@gitlab.com> | 2023-12-08 04:21:34 +0300 |
---|---|---|
committer | James Liu <jliu@gitlab.com> | 2023-12-18 03:23:13 +0300 |
commit | cb57a73f569aa3a8b34956f47e32b534d62599cd (patch) | |
tree | e0325154721e1b84727feb5bb0f245b84eb9381b | |
parent | 3c1d745a3216187bdf6a30ae52639b4488ae3dbb (diff) |
backup: Unexport pipelineErrors
It's not used outside of the backup package.
-rw-r--r-- | internal/backup/pipeline.go | 10 | ||||
-rw-r--r-- | internal/backup/pipeline_test.go | 2 |
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) |