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

Method TotalUpvotes

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

Source from the content-addressed store, hash-verified

115}
116
117func (b Blog) TotalUpvotes() int {
118 var upvotes int
119 for _, post := range b.Posts {
120 for _, comment := range post.Comments {
121 upvotes += comment.Upvotes
122 }
123 }
124 return upvotes
125}
126
127func (b Blog) TotalComments() int {
128 var comments int

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected