1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 10:18:38 +00:00

Use CommentList instead of []*Comment (#24828)

As title.
This commit is contained in:
Lunny Xiao
2023-05-21 20:48:28 +08:00
committed by GitHub
parent edd8ea0b0d
commit 64f6a5d113
4 changed files with 13 additions and 13 deletions

View File

@@ -1048,7 +1048,7 @@ func (opts *FindCommentsOptions) ToConds() builder.Cond {
}
// FindComments returns all comments according options
func FindComments(ctx context.Context, opts *FindCommentsOptions) ([]*Comment, error) {
func FindComments(ctx context.Context, opts *FindCommentsOptions) (CommentList, error) {
comments := make([]*Comment, 0, 10)
sess := db.GetEngine(ctx).Where(opts.ToConds())
if opts.RepoID > 0 {