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

Function generateComments

test/playground/data.go:106–119  ·  view source on GitHub ↗
(count int)

Source from the content-addressed store, hash-verified

104}
105
106func generateComments(count int) []Comment {
107 var comments []Comment
108 for i := 1; i <= count; i++ {
109 comment := Comment{
110 ID: i,
111 AuthorName: fmt.Sprintf("Commenter %d", i),
112 Content: fmt.Sprintf("This is comment %d!", i),
113 CommentDate: time.Now().AddDate(0, 0, -i),
114 Upvotes: i * 5,
115 }
116 comments = append(comments, comment)
117 }
118 return comments
119}

Callers 1

ExampleDataFunction · 0.85

Calls 1

SprintfMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…