diff

package
v0.0.0-...-813e729 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2018 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Depth          int64 = 0
	CountSameCalls int64 = 0
)

Functions

func IsSame

func IsSame(aNode, bNode ast.Node) bool

func IsSameText

func IsSameText(a, b string) bool

Types

type Color

type Color int
const (
	ColorSame Color = iota
	ColorNew
	ColorRemoved
	ColorSimilar
)

type ColorChange

type ColorChange struct {
	Color Color
	Pos   token.Pos
	End   token.Pos
}

func NewColorChange

func NewColorChange(color Color, node ast.Node) ColorChange

type Coloring

type Coloring []ColorChange

func Diff

func Diff(a, b ast.Node, mode Mode) Coloring

func LCS

func LCS(a, b string, offset int, mode Mode) (coloring Coloring)

type Mode

type Mode int
const (
	ModeNew Mode = iota
	ModeOld
)

func (Mode) String

func (m Mode) String() string

func (Mode) ToColor

func (m Mode) ToColor() Color

Jump to

Keyboard shortcuts

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