MCPcopy
hub / github.com/rgburke/grv / newSectionedDiffLineData

Function newSectionedDiffLineData

cmd/grv/diff_view.go:83–96  ·  view source on GitHub ↗
(sections []*diffLineSection, lineType diffLineType)

Source from the content-addressed store, hash-verified

81}
82
83func newSectionedDiffLineData(sections []*diffLineSection, lineType diffLineType) *diffLineData {
84 diffLine := &diffLineData{
85 sections: sections,
86 lineType: lineType,
87 }
88
89 var buf bytes.Buffer
90 for _, section := range sections {
91 buf.WriteString(section.text)
92 }
93 diffLine.line = buf.String()
94
95 return diffLine
96}
97
98type diffLines struct {
99 rawLines []*diffLineData

Callers 5

newDiffLineDataFunction · 0.85
initFunction · 0.85
processDiffHeaderMethod · 0.85
processHunkStartMethod · 0.85

Calls 1

StringMethod · 0.65

Tested by

no test coverage detected