Versions in this module Expand all Collapse all v1 v1.0.1 Jul 5, 2023 Changes in this version + const DefaultContextLines + type Chunk interface + Content func() string + Type func() Operation + type ColorConfig map[ColorKey]string + func NewColorConfig(options ...ColorConfigOption) ColorConfig + func (cc ColorConfig) Reset(key ColorKey) string + type ColorConfigOption func(ColorConfig) + func WithColor(key ColorKey, color string) ColorConfigOption + type ColorKey string + const Commit + const Context + const ContextBold + const ContextDimmed + const Frag + const Func + const Meta + const New + const NewBold + const NewDimmed + const NewMoved + const NewMovedAlternative + const NewMovedAlternativeDimmed + const NewMovedDimmed + const Old + const OldBold + const OldDimmed + const OldMoved + const OldMovedAlternative + const OldMovedAlternativeDimmed + const OldMovedDimmed + const Whitespace + type File interface + Hash func() plumbing.Hash + Mode func() filemode.FileMode + Path func() string + type FilePatch interface + Chunks func() []Chunk + Files func() (from, to File) + IsBinary func() bool + type Operation int + const Add + const Delete + const Equal + type Patch interface + FilePatches func() []FilePatch + Message func() string + type UnifiedEncoder struct + func NewUnifiedEncoder(w io.Writer, contextLines int) *UnifiedEncoder + func (e *UnifiedEncoder) Encode(patch Patch) error + func (e *UnifiedEncoder) SetColor(colorConfig ColorConfig) *UnifiedEncoder + func (e *UnifiedEncoder) SetDstPrefix(prefix string) *UnifiedEncoder + func (e *UnifiedEncoder) SetSrcPrefix(prefix string) *UnifiedEncoder