compare

package
v0.12.1-pre.1 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2023 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bytes added in v0.12.0

func Bytes(want, got []byte) string

Bytes is like Text but using byte slices.

func NamedText added in v0.12.0

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