Use a generic Set instead of a specified Set in kubelet

Signed-off-by: bzsuni <bingzhe.sun@daocloud.io>
This commit is contained in:
Kubernetes Prow Robot
2023-11-04 17:19:13 +01:00
committed by bzsuni
parent 5bf1e95541
commit a8d51f4f05
35 changed files with 103 additions and 103 deletions

View File

@@ -37,16 +37,16 @@ func newTestBasicWorkQueue() (*basicWorkQueue, *testingclock.FakeClock) {
}
func compareResults(t *testing.T, expected, actual []types.UID) {
expectedSet := sets.NewString()
expectedSet := sets.New[string]()
for _, u := range expected {
expectedSet.Insert(string(u))
}
actualSet := sets.NewString()
actualSet := sets.New[string]()
for _, u := range actual {
actualSet.Insert(string(u))
}
if !expectedSet.Equal(actualSet) {
t.Errorf("Expected %#v, got %#v", expectedSet.List(), actualSet.List())
t.Errorf("Expected %#v, got %#v", sets.List(expectedSet), sets.List(actualSet))
}
}