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,12 +34,9 @@ func NewRuleReader() *DefaultRuleReader {
func (arr *DefaultRuleReader) initReader() {
heartbeat := time.NewTicker(time.Second * 10)
for {
select {
case <-heartbeat.C:
for range heartbeat.C {
arr.heartbeat()
}
}
}
func (arr *DefaultRuleReader) Fetch() []*Rule {
......
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