Commit 4c6e4e2a by Torkel Ödegaard

fix: fixed gometalinter issues with Discord PR

parent 23738ad4
...@@ -91,8 +91,7 @@ func (this *DiscordNotifier) Notify(evalContext *alerting.EvalContext) error { ...@@ -91,8 +91,7 @@ func (this *DiscordNotifier) Notify(evalContext *alerting.EvalContext) error {
embed.Set("fields", fields) embed.Set("fields", fields)
embed.Set("footer", footer) embed.Set("footer", footer)
var image = make(map[string]interface{}) var image map[string]interface{}
var embeddedImage = false var embeddedImage = false
if evalContext.ImagePublicUrl != "" { if evalContext.ImagePublicUrl != "" {
...@@ -141,6 +140,9 @@ func (this *DiscordNotifier) Notify(evalContext *alerting.EvalContext) error { ...@@ -141,6 +140,9 @@ func (this *DiscordNotifier) Notify(evalContext *alerting.EvalContext) error {
} }
fw, err = w.CreateFormFile("file", "graph.png") fw, err = w.CreateFormFile("file", "graph.png")
if err != nil {
return err
}
if _, err = io.Copy(fw, f); err != nil { if _, err = io.Copy(fw, f); err != nil {
return err return err
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment