Fix gosimple issues (#17179)

Signed-off-by: Mario Trangoni <mjtrangoni@gmail.com>
This commit is contained in:
Mario Trangoni
2019-05-21 07:50:44 +02:00
committed by Carl Bergquist
parent 7e3ac4ebde
commit 66ba2aa524
5 changed files with 7 additions and 14 deletions
+1 -1
View File
@@ -171,7 +171,7 @@ func (this *DiscordNotifier) embedImage(cmd *models.SendWebhookSync, imagePath s
w.Close()
cmd.Body = string(b.Bytes())
cmd.Body = b.String()
cmd.ContentType = w.FormDataContentType()
return nil
+1 -1
View File
@@ -92,7 +92,7 @@ func (vn *VictoropsNotifier) Notify(evalContext *alerting.EvalContext) error {
messageType = alertStateRecovery
}
fields := make(map[string]interface{}, 0)
fields := make(map[string]interface{})
fieldLimitCount := 4
for index, evt := range evalContext.EvalMatches {
fields[evt.Metric] = evt.Value
+1 -1
View File
@@ -43,7 +43,7 @@ func DeleteOldLoginAttempts(cmd *m.DeleteOldLoginAttemptsCommand) error {
if err != nil {
return err
}
// nolint: gosimple
if result == nil || len(result) == 0 || result[0] == nil {
return nil
}