Skip to content

Commit

Permalink
chore: remove unused taggers field (#9513)
Browse files Browse the repository at this point in the history
Signed-off-by: cuishuang <[email protected]>
  • Loading branch information
cuishuang authored Nov 11, 2024
1 parent 0afa8e3 commit 264e274
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions pkg/skaffold/tag/tagger_mux.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import (
)

type TaggerMux struct {
taggers []Tagger
byImageName map[string]Tagger
}

Expand All @@ -41,18 +40,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 264e274

Please sign in to comment.