Skip to content

Commit ae27f59

Browse files
committed
Use constructor
1 parent 1cf3a28 commit ae27f59

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

pkg/proxy/ipvs/ipset.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -157,10 +157,7 @@ func (set *IPSet) syncIPSetEntries() {
157157
}
158158

159159
// currentIPSetEntries represents Endpoints watched from API Server.
160-
currentIPSetEntries := sets.New[string]()
161-
for _, appliedEntry := range appliedEntries {
162-
currentIPSetEntries.Insert(appliedEntry)
163-
}
160+
currentIPSetEntries := sets.New(appliedEntries...)
164161

165162
if !set.activeEntries.Equal(currentIPSetEntries) {
166163
// Clean legacy entries

0 commit comments

Comments
 (0)