refactor(tracker): change Iterate() func(yield):s to Iterate(yield)

This commit is contained in:
5684185+vsariola@users.noreply.github.com
2024-10-15 09:09:17 +03:00
parent 3986bbede7
commit b494a69a76
11 changed files with 90 additions and 104 deletions

View File

@ -35,12 +35,10 @@ func (m *Model) Alerts() *Alerts { return (*Alerts)(m) }
// Alerts methods
func (m *Alerts) Iterate() func(yield func(index int, alert Alert) bool) {
return func(yield func(index int, alert Alert) bool) {
for i, a := range m.alerts {
if !yield(i, a) {
break
}
func (m *Alerts) Iterate(yield func(index int, alert Alert) bool) {
for i, a := range m.alerts {
if !yield(i, a) {
break
}
}
}