Avoid using %#v for errors when %T is more informative

`%#v` may have significant performance costs in frequently invoked code.

Kubernetes-commit: 435db312e1773d3ad506604219b9b1d00176d6fc
This commit is contained in:
Clayton Coleman 2019-03-21 22:54:06 -04:00 committed by Kubernetes Publisher
parent 3d7e523148
commit c48e0dd815

View File

@ -555,7 +555,7 @@ func (p *processorListener) run() {
case deleteNotification:
p.handler.OnDelete(notification.oldObj)
default:
utilruntime.HandleError(fmt.Errorf("unrecognized notification: %#v", next))
utilruntime.HandleError(fmt.Errorf("unrecognized notification: %T", next))
}
}
// the only way to get here is if the p.nextCh is empty and closed