Alerting: golint fixes for alerting (#17246)

This commit is contained in:
Carl Bergquist
2019-06-03 10:25:58 +02:00
committed by GitHub
parent 60ddad8fdb
commit d8736a2547
39 changed files with 235 additions and 217 deletions

View File

@@ -120,7 +120,7 @@ func (gcn *GoogleChatNotifier) Notify(evalContext *alerting.EvalContext) error {
"Content-Type": "application/json; charset=UTF-8",
}
ruleURL, err := evalContext.GetRuleUrl()
ruleURL, err := evalContext.GetRuleURL()
if err != nil {
gcn.log.Error("evalContext returned an invalid rule URL")
}
@@ -152,10 +152,10 @@ func (gcn *GoogleChatNotifier) Notify(evalContext *alerting.EvalContext) error {
widgets = append(widgets, fields)
// if an image exists, add it as an image widget
if evalContext.ImagePublicUrl != "" {
if evalContext.ImagePublicURL != "" {
widgets = append(widgets, imageWidget{
Image: image{
ImageURL: evalContext.ImagePublicUrl,
ImageURL: evalContext.ImagePublicURL,
},
})
} else {