Skip to content

Commit 4752371

Browse files
committed
Fix linter errors
1 parent a27c0c7 commit 4752371

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

pkg/asset/ignition/bootstrap/registries.go

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,24 +7,26 @@ import (
77
"github.com/openshift/installer/pkg/types"
88
)
99

10-
type SourceSetKey struct {
10+
// sourceSetKey represents the set of fields that have to be unique to form
11+
// a merged list without duplicate entries for Image sources.
12+
type sourceSetKey struct {
1113
Source string
1214
SourcePolicy configv1.MirrorSourcePolicy
1315
}
1416

1517
// MergedMirrorSets consolidates a list of ImageDigestSources so that each
1618
// source appears only once.
1719
func MergedMirrorSets(sources []types.ImageDigestSource) []types.ImageDigestSource {
18-
sourceSet := make(map[SourceSetKey][]string)
19-
mirrorSet := make(map[SourceSetKey]sets.String)
20-
orderedSources := []SourceSetKey{}
20+
sourceSet := make(map[sourceSetKey][]string)
21+
mirrorSet := make(map[sourceSetKey]sets.Set[string])
22+
orderedSources := []sourceSetKey{}
2123

2224
for _, group := range sources {
23-
key := SourceSetKey{Source: group.Source, SourcePolicy: group.SourcePolicy}
25+
key := sourceSetKey{Source: group.Source, SourcePolicy: group.SourcePolicy}
2426
if _, ok := sourceSet[key]; !ok {
2527
orderedSources = append(orderedSources, key)
2628
sourceSet[key] = nil
27-
mirrorSet[key] = sets.NewString()
29+
mirrorSet[key] = sets.New[string]()
2830
}
2931
for _, mirror := range group.Mirrors {
3032
if !mirrorSet[key].Has(mirror) {

0 commit comments

Comments
 (0)