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

Function processComment

commands/bug/input/input.go:119–138  ·  view source on GitHub ↗
(raw string)

Source from the content-addressed store, hash-verified

117}
118
119func processComment(raw string) (string, error) {
120 lines := strings.Split(raw, "\n")
121
122 var buffer bytes.Buffer
123 for _, line := range lines {
124 if strings.HasPrefix(line, "#") {
125 continue
126 }
127 buffer.WriteString(line)
128 buffer.WriteString("\n")
129 }
130
131 message := strings.TrimSpace(buffer.String())
132
133 if message == "" {
134 return "", ErrEmptyMessage
135 }
136
137 return message, nil
138}
139
140const bugTitleTemplate = `%s
141

Callers 2

BugCommentEditorInputFunction · 0.85
BugCommentFileInputFunction · 0.85

Calls 2

StringMethod · 0.65
HasPrefixMethod · 0.45

Tested by

no test coverage detected