Skip to content

Commit

Permalink
remove no-used taggers field
Browse files Browse the repository at this point in the history
Signed-off-by: cuishuang <imcusg@gmail.com>
  • Loading branch information
cuishuang committed Nov 9, 2024
1 parent 01bf561 commit 44a62be
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions pkg/skaffold/tag/tagger_mux.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,18 +41,16 @@ func (t *TaggerMux) GenerateTag(ctx context.Context, image latest.Artifact) (str
func NewTaggerMux(runCtx *runcontext.RunContext) (Tagger, error) {
pipelines := runCtx.GetPipelines()
m := make(map[string]Tagger)
sl := make([]Tagger, len(pipelines))
for _, p := range pipelines {
t, err := getTagger(runCtx, &p.Build.TagPolicy)
if err != nil {
return nil, fmt.Errorf("creating tagger: %w", err)
}
sl = append(sl, t)
for _, a := range p.Build.Artifacts {
m[a.ImageName] = t
}
}
return &TaggerMux{taggers: sl, byImageName: m}, nil
return &TaggerMux{byImageName: m}, nil
}

func getTagger(runCtx *runcontext.RunContext, t *latest.TagPolicy) (Tagger, error) {
Expand Down

0 comments on commit 44a62be

Please sign in to comment.