go meta lint errors

This commit is contained in:
bergquist
2018-11-19 13:59:16 +01:00
parent 638eca3cdb
commit 862815d18d
2 changed files with 1 additions and 2 deletions

View File

@@ -125,7 +125,7 @@ func (c *EvalContext) GetNewState() m.AlertStateType {
return ns return ns
} }
since := time.Now().Sub(c.Rule.LastStateChange) since := time.Since(c.Rule.LastStateChange)
if c.PrevAlertState == m.AlertStatePending && since > c.Rule.For { if c.PrevAlertState == m.AlertStatePending && since > c.Rule.For {
return m.AlertStateAlerting return m.AlertStateAlerting
} }

View File

@@ -36,7 +36,6 @@ func TestGetStateFromEvalContext(t *testing.T) {
name string name string
expected models.AlertStateType expected models.AlertStateType
applyFn func(ec *EvalContext) applyFn func(ec *EvalContext)
focus bool
}{ }{
{ {
name: "ok -> alerting", name: "ok -> alerting",