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

`%#v` may have significant performance costs in frequently invoked code.
This commit is contained in:
Clayton Coleman 2019-03-21 22:54:06 -04:00
parent ecd43f13cf
commit 435db312e1
No known key found for this signature in database
GPG Key ID: 3D16906B4F1C5CB3

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