diff --git a/pkg/commands/patch/format.go b/pkg/commands/patch/format.go index ccfc7924d..afd09df4b 100644 --- a/pkg/commands/patch/format.go +++ b/pkg/commands/patch/format.go @@ -97,7 +97,7 @@ func (self *patchPresenter) format() string { for _, line := range hunk.bodyLines { style := self.patchLineStyle(line) - if line.isChange() { + if line.IsChange() { appendLine(self.formatLine(line.Content, style, lineIdx)) } else { appendLine(self.formatLineAux(line.Content, style, false)) diff --git a/pkg/commands/patch/patch_line.go b/pkg/commands/patch/patch_line.go index 994d7c4e9..78eef3a19 100644 --- a/pkg/commands/patch/patch_line.go +++ b/pkg/commands/patch/patch_line.go @@ -18,7 +18,7 @@ type PatchLine struct { Content string // something like '+ hello' (note the first character is not removed) } -func (self *PatchLine) isChange() bool { +func (self *PatchLine) IsChange() bool { return self.Kind == ADDITION || self.Kind == DELETION }