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

diff

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LineStats added in v0.20.0

func LineStats(before, after string, timeout time.Duration) (added, removed int)

LineStats counts added and removed lines, like git's numstat.

Types

type Hunk

type Hunk struct {
	BeforeStart int
	BeforeEnd   int
	AfterStart  int
	AfterEnd    int
}

Hunk describes one contiguous change using UTF-8 byte offsets.

func CharacterHunks

func CharacterHunks(before, after string, timeout time.Duration) []Hunk

CharacterHunks returns semantically cleaned character-level changes.

func LineHunks

func LineHunks(before, after string, timeout time.Duration) []Hunk

LineHunks aligns complete lines before returning changed ranges.

Jump to

Keyboard shortcuts

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