fix incorrect variable reference in handleUpdateEndpointSlice

This commit is contained in:
changmin 2024-12-17 15:06:04 +08:00 committed by GitHub
parent 3ec97a445f
commit 19aef482fa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -129,7 +129,7 @@ func (c *EndpointSliceConfig) handleAddEndpointSlice(obj interface{}) {
func (c *EndpointSliceConfig) handleUpdateEndpointSlice(oldObj, newObj interface{}) {
oldEndpointSlice, ok := oldObj.(*discoveryv1.EndpointSlice)
if !ok {
utilruntime.HandleError(fmt.Errorf("unexpected object type: %T", newObj))
utilruntime.HandleError(fmt.Errorf("unexpected object type: %T", oldObj))
return
}
newEndpointSlice, ok := newObj.(*discoveryv1.EndpointSlice)