simplify sort.Sort by using sort.Slice (#17066)

This commit is contained in:
Harshavardhana
2023-04-24 13:28:18 -07:00
committed by GitHub
parent 6addc7a35d
commit 8fd07bcd51
7 changed files with 39 additions and 78 deletions
+2 -2
View File
@@ -479,8 +479,8 @@ func TestTopLockEntries(t *testing.T) {
if len(exp) != len(got) {
return 0, false
}
sort.Sort(byResourceUID{exp})
sort.Sort(byResourceUID{got})
sort.Slice(exp, byResourceUID{exp}.Less)
sort.Slice(got, byResourceUID{got}.Less)
// printEntries(exp)
// printEntries(got)
for i, e := range exp {