Fix gosimple issues (#17179)
Signed-off-by: Mario Trangoni <mjtrangoni@gmail.com>
This commit is contained in:
committed by
Carl Bergquist
parent
7e3ac4ebde
commit
66ba2aa524
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user