compare

package
v0.15.0-pre.4 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2024 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bytes

func Bytes(want, got []byte) string

Bytes is like Text but using byte slices.

func NamedText

func NamedText(wantName, gotName, want, got string) string

NamedText is like text, but allows passing custom names of the 'want' and 'got' content.

func Text

func Text(want, got string) string

Text returns a formatted unified diff of the edits to go from want to got, returning "" if and only if want == got.

This function is intended for use in testing, and panics if any error occurs while computing the diff. It is not sufficiently tested for production use.

Types

This section is empty.

Jump to

Keyboard shortcuts

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