go meta lint errors

This commit is contained in:
bergquist
2018-11-19 14:00:20 +01:00
parent 638eca3cdb
commit 862815d18d
2 changed files with 1 additions and 2 deletions
+1 -1
View File
@@ -125,7 +125,7 @@ func (c *EvalContext) GetNewState() m.AlertStateType {
return ns
}
since := time.Now().Sub(c.Rule.LastStateChange)
since := time.Since(c.Rule.LastStateChange)
if c.PrevAlertState == m.AlertStatePending && since > c.Rule.For {
return m.AlertStateAlerting
}
@@ -36,7 +36,6 @@ func TestGetStateFromEvalContext(t *testing.T) {
name string
expected models.AlertStateType
applyFn func(ec *EvalContext)
focus bool
}{
{
name: "ok -> alerting",