Versions in this module Expand all Collapse all v0 v0.1.0 Jun 11, 2023 Changes in this version + func Fprint(w io.Writer, name string, diffs []Diff, opts ...Option) + func Print(name string, diffs []Diff, opts ...Option) + func Sprint(name string, diffs []Diff, opts ...Option) string + type Diff struct + Text string + Type DiffType + func DiffsFromDiffMatchPatch(diffs []diffmatchpatch.Diff) []Diff + type DiffType int + const DeleteDiffType + const EqualDiffType + const InsertDiffType + type Formatter func(text string) string + type Option func(p *Printer) + func WithAfterText(text string) Option + func WithBeforeText(text string) Option + func WithBuffer(buffer int) Option + func WithDeleteLineFormatter(f Formatter) Option + func WithDeleteTextFormatter(f Formatter) Option + func WithEqualFormatter(f Formatter) Option + func WithInsertLineFormatter(f Formatter) Option + func WithInsertTextFormatter(f Formatter) Option + func WithNameFormatter(f Formatter) Option + type Printer struct + func NewPrinter(opts ...Option) Printer + func (p Printer) Fprint(w io.Writer, name string, diffs []Diff, opts ...Option) + func (p Printer) Print(name string, diffs []Diff, opts ...Option) + func (p Printer) Sprint(name string, diffs []Diff, opts ...Option) string