toDomainSliceComments 将DAO评论切片转换为领域模型评论切片
(daoComments []dao.Comment)
| 162 | |
| 163 | // toDomainSliceComments 将DAO评论切片转换为领域模型评论切片 |
| 164 | func (c *commentRepository) toDomainSliceComments(daoComments []dao.Comment) []domain.Comment { |
| 165 | domainComments := make([]domain.Comment, 0, len(daoComments)) |
| 166 | for _, daoComment := range daoComments { |
| 167 | domainComments = append(domainComments, c.toDomainComment(daoComment)) |
| 168 | } |
| 169 | return domainComments |
| 170 | } |
no test coverage detected