Fix vet errors

This commit is contained in:
Jonas Franz 2018-07-06 18:36:53 +02:00
parent 8f77329aee
commit d8ddade96e
No known key found for this signature in database
GPG Key ID: 506AEEBE80BEDECD

View File

@ -126,19 +126,19 @@ func (r *Review) publish(e *xorm.Engine) error {
for _, lines := range r.CodeComments { for _, lines := range r.CodeComments {
for _, comments := range lines { for _, comments := range lines {
for _, comment := range comments { for _, comment := range comments {
go func() { go func(en *xorm.Engine, review *Review, comm *Comment) {
sess := x.NewSession() sess := en.NewSession()
defer sess.Close() defer sess.Close()
if err := sendCreateCommentAction(sess, &CreateCommentOptions{ if err := sendCreateCommentAction(sess, &CreateCommentOptions{
Doer: comment.Poster, Doer: comm.Poster,
Issue: r.Issue, Issue: review.Issue,
Repo: r.Issue.Repo, Repo: review.Issue.Repo,
Type: comment.Type, Type: comm.Type,
Content: comment.Content, Content: comm.Content,
}, comment); err != nil { }, comm); err != nil {
log.Warn("sendCreateCommentAction: %v", err) log.Warn("sendCreateCommentAction: %v", err)
} }
}() }(e, r, comment)
} }
} }
} }