Commit 68507e88 by Mario Trangoni

pkg/services/alerting/reader.go: Fix should use for range instead of for { select {} }.

$ gometalinter --vendor --deadline 10m --disable-all --enable=megacheck ./...
pkg/services/alerting/reader.go:37:2:warning: should use for range instead of for { select {} } (S1000) (megacheck)
parent e673337c
......@@ -34,11 +34,8 @@ func NewRuleReader() *DefaultRuleReader {
func (arr *DefaultRuleReader) initReader() {
heartbeat := time.NewTicker(time.Second * 10)
for {
select {
case <-heartbeat.C:
arr.heartbeat()
}
for range heartbeat.C {
arr.heartbeat()
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment