Fix gosimple check

We were doing a select without needing to.
This commit is contained in:
Sargun Dhillon
2020-12-04 13:07:46 -08:00
parent 4fd2b754b5
commit ca84620958

View File

@@ -72,8 +72,8 @@ func TestMonitorMultipleVersions(t *testing.T) {
defer lock.Unlock() defer lock.Unlock()
subscription := mv.Subscribe() subscription := mv.Subscribe()
for { for {
select { // Lint is wrong, we need to call the function each time to get a fresh channel.
case <-subscription.NewValueReady(): <-subscription.NewValueReady()
val := subscription.Value() val := subscription.Value()
triggers = append(triggers, val.Value.(int)) triggers = append(triggers, val.Value.(int))
ch <- struct{}{} ch <- struct{}{}
@@ -81,8 +81,6 @@ func TestMonitorMultipleVersions(t *testing.T) {
return return
} }
} }
}
}() }()
for i := 0; i < 10; i++ { for i := 0; i < 10; i++ {