mirror of
https://github.com/vsariola/sointu.git
synced 2025-07-19 21:44:38 -04:00
refactor(tracker): change Iterate() func(yield):s to Iterate(yield)
This commit is contained in:
parent
3986bbede7
commit
b494a69a76
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user