Help us shape the future of Go! Take the 2026 Go Developer Survey

formatter

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2017 License: MIT Imports: 6 Imported by: 0

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

func (*AsciiFormatter) Format

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

type AsciiFormatterConfig

type AsciiFormatterConfig struct {
	ShowArrayIndex bool
	Coloring       bool
}

type AsciiLine

type AsciiLine struct {
	// contains filtered or unexported fields
}

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