mirror of
https://github.com/grafana/grafana.git
synced 2025-02-20 11:48:34 -06:00
pkg/services/sqlstore/alert_notification.go: Simplify err check
$ gometalinter --vendor --disable=all --enable=megacheck --deadline=10m ./...
pkg/services/sqlstore/alert_notification.go:242:3⚠️ 'if err != nil { return err }; return nil' can be simplified to 'return err' (S1013) (megacheck)
This commit is contained in:
parent
61b2100b9f
commit
bb5aaa2dce
@ -239,11 +239,8 @@ func RecordNotificationJournal(ctx context.Context, cmd *m.RecordNotificationJou
|
||||
Success: cmd.Success,
|
||||
}
|
||||
|
||||
if _, err := sess.Insert(journalEntry); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
_, err := sess.Insert(journalEntry)
|
||||
return err
|
||||
})
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user