()
| 95 | } |
| 96 | |
| 97 | func (b Blog) RecentPosts() []Post { |
| 98 | var posts []Post |
| 99 | for _, post := range b.Posts { |
| 100 | if post.Published() { |
| 101 | posts = append(posts, post) |
| 102 | } |
| 103 | } |
| 104 | return posts |
| 105 | } |
| 106 | |
| 107 | func (b Blog) PopularPosts() []Post { |
| 108 | var posts []Post |