MCPcopy Index your code
hub / github.com/cli/cli / isHeaderLine

Function isHeaderLine

pkg/cmd/pr/diff/diff.go:281–289  ·  view source on GitHub ↗
(l []byte)

Source from the content-addressed store, hash-verified

279var diffHeaderPrefixes = []string{"+++", "---", "diff", "index"}
280
281func isHeaderLine(l []byte) bool {
282 dl := string(l)
283 for _, p := range diffHeaderPrefixes {
284 if strings.HasPrefix(dl, p) {
285 return true
286 }
287 }
288 return false
289}
290
291func isAdditionLine(l []byte) bool {
292 return len(l) > 0 && l[0] == '+'

Callers 1

colorDiffLinesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected