()
| 105 | } |
| 106 | |
| 107 | func (b Blog) PopularPosts() []Post { |
| 108 | var posts []Post |
| 109 | for _, post := range b.Posts { |
| 110 | if post.Likes > 150 { |
| 111 | posts = append(posts, post) |
| 112 | } |
| 113 | } |
| 114 | return posts |
| 115 | } |
| 116 | |
| 117 | func (b Blog) TotalUpvotes() int { |
| 118 | var upvotes int |
nothing calls this directly
no outgoing calls
no test coverage detected