mirror of
https://github.com/kubernetes/client-go.git
synced 2025-07-17 08:41:53 +00:00
Use range in loops; misc fixes
Kubernetes-commit: c23a8a85cce80a1015797e9c76aae709d9910791
This commit is contained in:
parent
991626bd9b
commit
37d44da37d
@ -225,11 +225,7 @@ func (eventBroadcaster *eventBroadcasterImpl) StartEventWatcher(eventHandler fun
|
||||
watcher := eventBroadcaster.Watch()
|
||||
go func() {
|
||||
defer utilruntime.HandleCrash()
|
||||
for {
|
||||
watchEvent, open := <-watcher.ResultChan()
|
||||
if !open {
|
||||
return
|
||||
}
|
||||
for watchEvent := range watcher.ResultChan() {
|
||||
event, ok := watchEvent.Object.(*v1.Event)
|
||||
if !ok {
|
||||
// This is all local, so there's no reason this should
|
||||
|
Loading…
Reference in New Issue
Block a user