(i, j int)
| 108 | func (as Alerts) Swap(i, j int) { as[i], as[j] = as[j], as[i] } |
| 109 | |
| 110 | func (as Alerts) Less(i, j int) bool { |
| 111 | if as[i].StartsAt.Before(as[j].StartsAt) { |
| 112 | return true |
| 113 | } |
| 114 | if as[i].EndsAt.Before(as[j].EndsAt) { |
| 115 | return true |
| 116 | } |
| 117 | return as[i].Fingerprint() < as[j].Fingerprint() |
| 118 | } |
| 119 | |
| 120 | // HasFiring returns true iff one of the alerts is not resolved. |
| 121 | func (as Alerts) HasFiring() bool { |
nothing calls this directly
no test coverage detected