MCPcopy Index your code
hub / github.com/antonmedv/gitmal / Line

Method Line

pkg/gitdiff/parser.go:135–137  ·  view source on GitHub ↗

Line returns a line from the parser without advancing it. A delta of 0 returns the current line, while higher deltas return read-ahead lines. It returns an empty string if the delta is higher than the available lines, either because of the buffer size or because the parser reached the end of the inp

(delta uint)

Source from the content-addressed store, hash-verified

133// either because of the buffer size or because the parser reached the end of
134// the input. Valid lines always contain at least a newline character.
135func (p *parser) Line(delta uint) string {
136 return p.lines[delta]
137}
138
139// Errorf generates an error and appends the current line information.
140func (p *parser) Errorf(delta int64, msg string, args ...interface{}) error {

Callers 10

ParseTextChunkMethod · 0.95
ParseBinaryMarkerMethod · 0.95
ParseBinaryChunkMethod · 0.95
ParseNextFileHeaderMethod · 0.95
ParseGitFileHeaderMethod · 0.95
TestLineOperationsFunction · 0.80

Calls

no outgoing calls

Tested by 2

TestLineOperationsFunction · 0.64