MCPcopy Index your code
hub / github.com/coder/guts / normalizeCommentText

Function normalizeCommentText

comments.go:168–179  ·  view source on GitHub ↗
(text string)

Source from the content-addressed store, hash-verified

166}
167
168func normalizeCommentText(text string) string {
169 // TODO: Is there a better way to get just the text of the comment?
170 text = strings.TrimPrefix(text, "//")
171 text = strings.TrimPrefix(text, "/*")
172 text = strings.TrimSuffix(text, "*/")
173
174 // Normalize CRLF to LF for cross-platform compatibility
175 text = strings.ReplaceAll(text, "\r\n", "\n")
176 text = strings.ReplaceAll(text, "\r", "\n")
177
178 return text
179}

Callers 1

syntheticCommentsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…