diff

package
v0.0.14 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Analyzer

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

func NewAnalyzer

func NewAnalyzer(workfile io.Reader, truthfile io.Reader) *Analyzer

func (*Analyzer) Analyze

func (anly *Analyzer) Analyze() *Diffs

type Differ

type Differ int
const (
	Added Differ = iota
	Removed
)

type Diffline

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

func NewDiffline

func NewDiffline(line int, text string, differ Differ) *Diffline

func (*Diffline) Added

func (l *Diffline) Added() bool

func (*Diffline) Line

func (l *Diffline) Line() int

func (*Diffline) Text

func (v *Diffline) Text() string

type Diffs

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

func NewDiffs

func NewDiffs() *Diffs

func (*Diffs) CountAdd

func (diffs *Diffs) CountAdd() int

func (*Diffs) CountRemove

func (diffs *Diffs) CountRemove() int

func (*Diffs) ListHunks

func (diffs *Diffs) ListHunks() []Hunk

func (*Diffs) ListItems

func (diffs *Diffs) ListItems() []Diffline

func (*Diffs) MarkAdd

func (diffs *Diffs) MarkAdd(value Value)

func (*Diffs) MarkRemove

func (diffs *Diffs) MarkRemove(value Value)

type Hunk

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

func NewHunk

func NewHunk() *Hunk

func (*Hunk) ListItems

func (hunk *Hunk) ListItems() []Diffline

func (*Hunk) Push

func (hunk *Hunk) Push(diffline Diffline)

type Value

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

func NewValue

func NewValue(line int, has bool, text string) *Value

func (*Value) Has

func (v *Value) Has() bool

to recognize empty string or null.

func (*Value) Line

func (v *Value) Line() int

func (*Value) Text

func (v *Value) Text() string

Jump to

Keyboard shortcuts

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