Browse Source

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:warning: 'if err != nil { return err }; return nil' can be simplified to 'return err' (S1013) (megacheck)
Mario Trangoni 7 years ago
parent
commit
bb5aaa2dce
1 changed files with 2 additions and 5 deletions
  1. 2 5
      pkg/services/sqlstore/alert_notification.go

+ 2 - 5
pkg/services/sqlstore/alert_notification.go

@@ -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
 	})
 }