Skip to content

Commit

Permalink
remove bool return from EventByName in looper
Browse files Browse the repository at this point in the history
  • Loading branch information
rcoreilly committed Aug 28, 2024
1 parent 2e7f412 commit 810c5a9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions looper/loop.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,14 @@ func (lp *Loop) AddNewEvent(name string, atCtr int, fun func()) *Event {
return ev
}

// EventByName returns event by name, false if not found
func (lp *Loop) EventByName(name string) (*Event, bool) {
// EventByName returns event by name, nil if not found
func (lp *Loop) EventByName(name string) *Event {
for _, ev := range lp.Events {
if ev.Name == name {
return ev, true
return ev
}
}
return nil, false
return nil
}

// SkipToMax sets the counter to its Max value for this level.
Expand Down

0 comments on commit 810c5a9

Please sign in to comment.