diff

package
v0.0.0-...-1388524 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package diff implements a structural, non-exact diff of two strings.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DiffArgs

type DiffArgs struct {
	RelativePrec float64
	AbsolutePrec float64
}

type DiffResult

type DiffResult struct {
	// Whether the strings matched.
	Match bool

	// A textual description of the difference.
	Description string
}

DiffResult describes a comparison of two strings.

func Diff

func Diff(ref, out io.Reader, args DiffArgs) (*DiffResult, error)

Diff compares the contents of the two readers on a tokenized basis, not taking casing into account.

Jump to

Keyboard shortcuts

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