Skip to content

Commit 7f87dd6

Browse files
committed
Fix linter errors
1 parent a27c0c7 commit 7f87dd6

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

pkg/asset/ignition/bootstrap/registries.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,35 @@
11
package bootstrap
22

33
import (
4-
"k8s.io/apimachinery/pkg/util/sets"
5-
64
configv1 "github.com/openshift/api/config/v1"
75
"github.com/openshift/installer/pkg/types"
86
)
97

10-
type SourceSetKey struct {
8+
// sourceSetKey represents the set of fields that have to be unique to form
9+
// a merged list without duplicate entries for Image sources.
10+
type sourceSetKey struct {
1111
Source string
1212
SourcePolicy configv1.MirrorSourcePolicy
1313
}
1414

1515
// MergedMirrorSets consolidates a list of ImageDigestSources so that each
1616
// source appears only once.
1717
func MergedMirrorSets(sources []types.ImageDigestSource) []types.ImageDigestSource {
18-
sourceSet := make(map[SourceSetKey][]string)
19-
mirrorSet := make(map[SourceSetKey]sets.String)
20-
orderedSources := []SourceSetKey{}
18+
sourceSet := make(map[sourceSetKey][]string)
19+
mirrorSet := make(map[sourceSetKey][]string)
20+
orderedSources := []sourceSetKey{}
2121

2222
for _, group := range sources {
23-
key := SourceSetKey{Source: group.Source, SourcePolicy: group.SourcePolicy}
23+
key := sourceSetKey{Source: group.Source, SourcePolicy: group.SourcePolicy}
2424
if _, ok := sourceSet[key]; !ok {
2525
orderedSources = append(orderedSources, key)
2626
sourceSet[key] = nil
27-
mirrorSet[key] = sets.NewString()
27+
mirrorSet[key] = nil
2828
}
2929
for _, mirror := range group.Mirrors {
30-
if !mirrorSet[key].Has(mirror) {
30+
if _, ok := mirrorSet[key]; !ok {
3131
sourceSet[key] = append(sourceSet[key], mirror)
32-
mirrorSet[key].Insert(mirror)
32+
mirrorSet[key] = append(mirrorSet[key], mirror)
3333
}
3434
}
3535
}

0 commit comments

Comments
 (0)