diff options
author | Sandro Santilli <strk@kbt.io> | 2016-11-07 16:37:32 +0100 |
---|---|---|
committer | Sandro Santilli <strk@kbt.io> | 2016-11-07 17:05:08 +0100 |
commit | 80eea77953ab5f1f12e1a01f1930b72c360a5c76 (patch) | |
tree | ef36958df6ecdf84f37a9f5c9680f591ba5cc25c /models/issue_comment.go | |
parent | 5d430c9e68f7e50e6d1727c43518e84579fd6a4f (diff) | |
download | gitea-80eea77953ab5f1f12e1a01f1930b72c360a5c76.tar.gz gitea-80eea77953ab5f1f12e1a01f1930b72c360a5c76.zip |
Use MixedCase constant names
See https://github.com/golang/go/wiki/CodeReviewComments#mixed-caps
Diffstat (limited to 'models/issue_comment.go')
-rw-r--r-- | models/issue_comment.go | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/models/issue_comment.go b/models/issue_comment.go index d75b42cd3f..b8ab8c23eb 100644 --- a/models/issue_comment.go +++ b/models/issue_comment.go @@ -144,11 +144,11 @@ func (cmt *Comment) MailParticipants(opType ActionType, issue *Issue) (err error } switch opType { - case ACTION_COMMENT_ISSUE: + case ActionCommentIssue: issue.Content = cmt.Content - case ACTION_CLOSE_ISSUE: + case ActionCloseIssue: issue.Content = fmt.Sprintf("Closed #%d", issue.Index) - case ACTION_REOPEN_ISSUE: + case ActionReopenIssue: issue.Content = fmt.Sprintf("Reopened #%d", issue.Index) } if err = mailIssueCommentToParticipants(issue, cmt.Poster, mentions); err != nil { @@ -188,7 +188,7 @@ func createComment(e *xorm.Session, opts *CreateCommentOptions) (_ *Comment, err // Check comment type. switch opts.Type { case COMMENT_TYPE_COMMENT: - act.OpType = ACTION_COMMENT_ISSUE + act.OpType = ActionCommentIssue if _, err = e.Exec("UPDATE `issue` SET num_comments=num_comments+1 WHERE id=?", opts.Issue.ID); err != nil { return nil, err @@ -217,9 +217,9 @@ func createComment(e *xorm.Session, opts *CreateCommentOptions) (_ *Comment, err } case COMMENT_TYPE_REOPEN: - act.OpType = ACTION_REOPEN_ISSUE + act.OpType = ActionReopenIssue if opts.Issue.IsPull { - act.OpType = ACTION_REOPEN_PULL_REQUEST + act.OpType = ActionReopenPullRequest } if opts.Issue.IsPull { @@ -232,9 +232,9 @@ func createComment(e *xorm.Session, opts *CreateCommentOptions) (_ *Comment, err } case COMMENT_TYPE_CLOSE: - act.OpType = ACTION_CLOSE_ISSUE + act.OpType = ActionCloseIssue if opts.Issue.IsPull { - act.OpType = ACTION_CLOSE_PULL_REQUEST + act.OpType = ActionClosePullRequest } if opts.Issue.IsPull { |