Skip to content

Commit 5afbe0a

Browse files
author
Eric Van Norman
authored
Fix lint errors updating linter to 1.56 (#49330)
1 parent c038d9a commit 5afbe0a

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

Diff for: pilot/pkg/config/monitor/file_snapshot.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -126,5 +126,5 @@ func (rs byKey) Swap(i, j int) {
126126
}
127127

128128
func (rs byKey) Less(i, j int) bool {
129-
return compareIds(rs[i], rs[j]) < 0
129+
return compareIDs(rs[i], rs[j]) < 0
130130
}

Diff for: pilot/pkg/config/monitor/monitor.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ func (m *Monitor) checkAndUpdate() {
179179
for oldIndex < oldLen && newIndex < newLen {
180180
oldConfig := m.configs[oldIndex]
181181
newConfig := newConfigs[newIndex]
182-
if v := compareIds(oldConfig, newConfig); v < 0 {
182+
if v := compareIDs(oldConfig, newConfig); v < 0 {
183183
m.deleteConfig(oldConfig)
184184
oldIndex++
185185
} else if v > 0 {
@@ -234,8 +234,8 @@ func (m *Monitor) deleteConfig(c *config.Config) {
234234
}
235235
}
236236

237-
// compareIds compares the IDs (i.e. Namespace, GroupVersionKind, and Name) of the two configs and returns
237+
// compareIDs compares the IDs (i.e. Namespace, GroupVersionKind, and Name) of the two configs and returns
238238
// 0 if a == b, -1 if a < b, and 1 if a > b. Used for sorting config arrays.
239-
func compareIds(a, b *config.Config) int {
239+
func compareIDs(a, b *config.Config) int {
240240
return strings.Compare(a.Key(), b.Key())
241241
}

Diff for: security/pkg/pki/util/san_test.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -77,13 +77,13 @@ func TestBuildAndExtractIdentities(t *testing.T) {
7777
t.Errorf("A unexpected error has been encountered (error: %v)", err)
7878
}
7979

80-
actualIds, err := ExtractIDsFromSAN(san)
80+
actualIDs, err := ExtractIDsFromSAN(san)
8181
if err != nil {
8282
t.Errorf("A unexpected error has been encountered (error: %v)", err)
8383
}
8484

85-
if !reflect.DeepEqual(actualIds, ids) {
86-
t.Errorf("Unmatched identities: before encoding: %v, after decoding %v", ids, actualIds)
85+
if !reflect.DeepEqual(actualIDs, ids) {
86+
t.Errorf("Unmatched identities: before encoding: %v, after decoding %v", ids, actualIDs)
8787
}
8888

8989
if !san.Critical {

0 commit comments

Comments
 (0)