Documentation
¶
Index ¶
Constants ¶
View Source
const ( AsciiSame = " " AsciiAdded = "+" AsciiDeleted = "-" )
View Source
const ( DeltaDelete = 0 DeltaTextDiff = 2 DeltaMove = 3 )
Variables ¶
View Source
var AsciiFormatterDefaultConfig = AsciiFormatterConfig{}
View Source
var AsciiStyles = map[string]string{ AsciiAdded: "30;42", AsciiDeleted: "30;41", }
Functions ¶
This section is empty.
Types ¶
type AsciiFormatter ¶
type AsciiFormatter struct {
// contains filtered or unexported fields
}
func NewAsciiFormatter ¶
func NewAsciiFormatter(left interface{}, config AsciiFormatterConfig) *AsciiFormatter
type AsciiFormatterConfig ¶
type DeltaFormatter ¶
type DeltaFormatter struct {
PrintIndent bool
}
func NewDeltaFormatter ¶
func NewDeltaFormatter() *DeltaFormatter
func (*DeltaFormatter) Format ¶
func (f *DeltaFormatter) Format(diff diff.Diff) (result string, err error)
func (*DeltaFormatter) FormatAsJson ¶
func (f *DeltaFormatter) FormatAsJson(diff diff.Diff) (json map[string]interface{}, err error)
Click to show internal directories.
Click to hide internal directories.