textdiff

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package textdiff produces a line-level edit script (equal/del/add) for two slices of lines, delegating the diff to github.com/aymanbagabas/go-udiff.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Kind

type Kind int

Kind is the kind of a diff Op.

const (
	Equal Kind = iota
	Del
	Add
)

type Op

type Op struct {
	Kind Kind
	Text string
}

Op is one line in the edit script.

func Lines

func Lines(a, b []string) []Op

Lines returns the equal/del/add edit script transforming a into b.

Jump to

Keyboard shortcuts

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