Skip to content

Commit

Permalink
fixup! Support for Librato Alerts and Services
Browse files Browse the repository at this point in the history
  • Loading branch information
elblivion committed Aug 31, 2016
1 parent c904184 commit e267db8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion resource_librato_alert.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,10 @@ func resourceLibratoAlertConditionsHash(v interface{}) int {
var buf bytes.Buffer
m := v.(map[string]interface{})
buf.WriteString(fmt.Sprintf("%s-", m["type"].(string)))
buf.WriteString(fmt.Sprintf("%f-", m["threshold"].(float64)))
threshold, present := m["threshold"]
if present {
buf.WriteString(fmt.Sprintf("%f-", threshold.(float64)))
}
buf.WriteString(fmt.Sprintf("%s-", m["metric_name"].(string)))

return hashcode.String(buf.String())
Expand Down

0 comments on commit e267db8

Please sign in to comment.