(count int)
| 104 | } |
| 105 | |
| 106 | func generateComments(count int) []Comment { |
| 107 | var comments []Comment |
| 108 | for i := 1; i <= count; i++ { |
| 109 | comment := Comment{ |
| 110 | ID: i, |
| 111 | AuthorName: fmt.Sprintf("Commenter %d", i), |
| 112 | Content: fmt.Sprintf("This is comment %d!", i), |
| 113 | CommentDate: time.Now().AddDate(0, 0, -i), |
| 114 | Upvotes: i * 5, |
| 115 | } |
| 116 | comments = append(comments, comment) |
| 117 | } |
| 118 | return comments |
| 119 | } |
no test coverage detected
searching dependent graphs…