simplediff

package
v0.0.66 Latest Latest
Warning

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

Go to latest
Published: May 12, 2024 License: Apache-2.0 Imports: 1 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Separator = "\n"

Separator is the separator of lines.

Functions

This section is empty.

Types

type DiffOperation

type DiffOperation struct {
	Op   string // "+" for add, "-" for delete, " " for no change
	Text string
}

DiffOperation represents a single operation in a diff.

type DiffOperations

type DiffOperations []DiffOperation

DiffOperations represents a collection of DiffOperation.

func Diff

func Diff(before, after string) DiffOperations

diff returns a slice of DiffOp representing the diff of two slices.

func (DiffOperations) String

func (diffOps DiffOperations) String() string

Jump to

Keyboard shortcuts

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