diff options
author | 6543 <6543@obermui.de> | 2022-01-20 18:46:10 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-20 18:46:10 +0100 |
commit | 54e9ee37a7a301dbe74d46fd3c87712e6120e9bf (patch) | |
tree | 1be12fb072625c1b896b9d72f7912b018aad502b /modules/notification/ui | |
parent | 1d98d205f5825f40110e6628b61a97c91ac7f72d (diff) | |
download | gitea-54e9ee37a7a301dbe74d46fd3c87712e6120e9bf.tar.gz gitea-54e9ee37a7a301dbe74d46fd3c87712e6120e9bf.zip |
format with gofumpt (#18184)
* gofumpt -w -l .
* gofumpt -w -l -extra .
* Add linter
* manual fix
* change make fmt
Diffstat (limited to 'modules/notification/ui')
-rw-r--r-- | modules/notification/ui/ui.go | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/modules/notification/ui/ui.go b/modules/notification/ui/ui.go index fd44cd15fd..ecedd70193 100644 --- a/modules/notification/ui/ui.go +++ b/modules/notification/ui/ui.go @@ -29,9 +29,7 @@ type ( } ) -var ( - _ base.Notifier = ¬ificationService{} -) +var _ base.Notifier = ¬ificationService{} // NewNotifier create a new notificationService notifier func NewNotifier() base.Notifier { @@ -55,7 +53,7 @@ func (ns *notificationService) Run() { func (ns *notificationService) NotifyCreateIssueComment(doer *user_model.User, repo *repo_model.Repository, issue *models.Issue, comment *models.Comment, mentions []*user_model.User) { - var opts = issueNotificationOpts{ + opts := issueNotificationOpts{ IssueID: issue.ID, NotificationAuthorID: doer.ID, } @@ -64,7 +62,7 @@ func (ns *notificationService) NotifyCreateIssueComment(doer *user_model.User, r } _ = ns.issueQueue.Push(opts) for _, mention := range mentions { - var opts = issueNotificationOpts{ + opts := issueNotificationOpts{ IssueID: issue.ID, NotificationAuthorID: doer.ID, ReceiverID: mention.ID, @@ -153,7 +151,7 @@ func (ns *notificationService) NotifyNewPullRequest(pr *models.PullRequest, ment } func (ns *notificationService) NotifyPullRequestReview(pr *models.PullRequest, r *models.Review, c *models.Comment, mentions []*user_model.User) { - var opts = issueNotificationOpts{ + opts := issueNotificationOpts{ IssueID: pr.Issue.ID, NotificationAuthorID: r.Reviewer.ID, } @@ -162,7 +160,7 @@ func (ns *notificationService) NotifyPullRequestReview(pr *models.PullRequest, r } _ = ns.issueQueue.Push(opts) for _, mention := range mentions { - var opts = issueNotificationOpts{ + opts := issueNotificationOpts{ IssueID: pr.Issue.ID, NotificationAuthorID: r.Reviewer.ID, ReceiverID: mention.ID, @@ -186,7 +184,7 @@ func (ns *notificationService) NotifyPullRequestCodeComment(pr *models.PullReque } func (ns *notificationService) NotifyPullRequestPushCommits(doer *user_model.User, pr *models.PullRequest, comment *models.Comment) { - var opts = issueNotificationOpts{ + opts := issueNotificationOpts{ IssueID: pr.IssueID, NotificationAuthorID: doer.ID, CommentID: comment.ID, @@ -195,7 +193,7 @@ func (ns *notificationService) NotifyPullRequestPushCommits(doer *user_model.Use } func (ns *notificationService) NotifyPullRevieweDismiss(doer *user_model.User, review *models.Review, comment *models.Comment) { - var opts = issueNotificationOpts{ + opts := issueNotificationOpts{ IssueID: review.IssueID, NotificationAuthorID: doer.ID, CommentID: comment.ID, @@ -205,7 +203,7 @@ func (ns *notificationService) NotifyPullRevieweDismiss(doer *user_model.User, r func (ns *notificationService) NotifyIssueChangeAssignee(doer *user_model.User, issue *models.Issue, assignee *user_model.User, removed bool, comment *models.Comment) { if !removed { - var opts = issueNotificationOpts{ + opts := issueNotificationOpts{ IssueID: issue.ID, NotificationAuthorID: doer.ID, ReceiverID: assignee.ID, @@ -221,7 +219,7 @@ func (ns *notificationService) NotifyIssueChangeAssignee(doer *user_model.User, func (ns *notificationService) NotifyPullReviewRequest(doer *user_model.User, issue *models.Issue, reviewer *user_model.User, isRequest bool, comment *models.Comment) { if isRequest { - var opts = issueNotificationOpts{ + opts := issueNotificationOpts{ IssueID: issue.ID, NotificationAuthorID: doer.ID, ReceiverID: reviewer.ID, |