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

Method WithID

test/playground/env.go:164–171  ·  view source on GitHub ↗
(posts []Post, id int)

Source from the content-addressed store, hash-verified

162}
163
164func (Blog) WithID(posts []Post, id int) Post {
165 for _, post := range posts {
166 if post.ID == id {
167 return post
168 }
169 }
170 return Post{}
171}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected