// SetCommentPageMeta set comment's page meta. func SetCommentPageMeta(commentList *model.CommentList, currentPage int, hasPrev bool, hasNext bool, count int) { if len(commentList.Comments) == 0 { commentList.Comments = make([]model.Comment, 0) } commentList.CurrentPage = currentPage commentList.HasPrev = hasPrev commentList.HasNext = hasNext commentList.Count = count }