MCPcopy Create free account
hub / github.com/PerpetualSoftware/pad / hunkRange

Function hunkRange

internal/diff/unified.go:103–111  ·  view source on GitHub ↗
(start, count int)

Source from the content-addressed store, hash-verified

101}
102
103func hunkRange(start, count int) string {
104 if count == 0 {
105 return fmt.Sprintf("%d,0", start-1)
106 }
107 if count == 1 {
108 return fmt.Sprintf("%d", start)
109 }
110 return fmt.Sprintf("%d,%d", start, count)
111}
112
113// splitKeepEnd splits s into lines, each keeping its "\n"; a last line
114// without one is kept as is.

Callers 1

UnifiedFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected