MCPcopy Create free account
hub / github.com/expr-lang/expr / PopularPosts

Method PopularPosts

test/playground/env.go:107–115  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

105}
106
107func (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
117func (b Blog) TotalUpvotes() int {
118 var upvotes int

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected