Skip to content

Commit

Permalink
Incorporate review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Neha Manjunath committed Jul 25, 2023
1 parent 85fd162 commit 60e6386
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
6 changes: 3 additions & 3 deletions events/events.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Package events provides events status for a namespace using kubectl.
// Package events provides events status for a namespace.
package events

import (
Expand Down Expand Up @@ -108,7 +108,7 @@ func EventToStatus(event *corev1.Event) *EventStatus {
}
event.DeepCopyInto(&s.Event)
event = &s.Event
s.Type = event.DeepCopy().Type
s.Message = event.DeepCopy().Message
s.Type = event.Type
s.Message = event.Message
return &s
}
9 changes: 4 additions & 5 deletions events/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,8 @@ type Watcher struct {
stdout io.Writer
warningf func(string, ...any)

mu sync.Mutex
progress bool
currentNamespace string
mu sync.Mutex
progress bool
}

var errorMsgs = [2]string{"Insufficient memory", "Insufficient cpu"}
Expand Down Expand Up @@ -89,9 +88,9 @@ func (w *Watcher) Cleanup(err error) error {
select {
case werr := <-w.errCh:
if err != nil {
w.warningf("Create() failed: %v", err)
w.warningf("Event Watcher failed: %v", err)
}
w.warningf("Topology creation failed: %v", werr)
w.warningf("Event Watcher error: %v", werr)
return werr
default:
}
Expand Down

0 comments on commit 60e6386

Please sign in to comment.