MCPcopy Index your code
hub / github.com/git-bug/git-bug / parseComments

Function parseComments

commands/bug/bug_comment_test.go:44–62  ·  view source on GitHub ↗
(t *testing.T, env *execenv.Env)

Source from the content-addressed store, hash-verified

42}
43
44func parseComments(t *testing.T, env *execenv.Env) []parsedComment {
45 t.Helper()
46
47 parser := &commentParser{
48 t: t,
49 comments: []parsedComment{},
50 }
51
52 comment := &parsedComment{}
53 parser.fn = parser.parseAuthor
54
55 for _, line := range strings.Split(env.Out.String(), "\n") {
56 parser.fn(comment, line)
57 }
58
59 parser.comments = append(parser.comments, *comment)
60
61 return parser.comments
62}
63
64func (p *commentParser) parseAuthor(comment *parsedComment, line string) {
65 p.t.Helper()

Callers 1

requireCommentsEqualFunction · 0.85

Calls 2

HelperMethod · 0.80
StringMethod · 0.65

Tested by

no test coverage detected