formatter

package
v0.0.0-...-4e533b0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 29, 2016 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AsciiSame    = " "
	AsciiAdded   = "+"
	AsciiDeleted = "-"
)
View Source
const (
	DeltaDelete   = 0
	DeltaTextDiff = 2
	DeltaMove     = 3
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AsciiFormatter

type AsciiFormatter struct {
	ShowArrayIndex bool
	// contains filtered or unexported fields
}

func NewAsciiFormatter

func NewAsciiFormatter(left interface{}) *AsciiFormatter

func (*AsciiFormatter) Format

func (f *AsciiFormatter) Format(diff diff.Diff) (result string, err error)

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)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL