MCPcopy Create free account
hub / github.com/antonmedv/gitmal / removeLastNewline

Function removeLastNewline

pkg/gitdiff/text.go:160–165  ·  view source on GitHub ↗
(frag *TextFragment)

Source from the content-addressed store, hash-verified

158}
159
160func removeLastNewline(frag *TextFragment) {
161 if len(frag.Lines) > 0 {
162 last := &frag.Lines[len(frag.Lines)-1]
163 last.Line = strings.TrimSuffix(last.Line, "\n")
164 }
165}
166
167func parseRange(s string) (start int64, end int64, err error) {
168 parts := strings.SplitN(s, ",", 2)

Callers 1

ParseTextChunkMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected