diff

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Diff

func Diff(a, b interface{}) (desc []string)

Diff returns a slice where each element describes a difference between a and b.

func Fdiff

func Fdiff(w io.Writer, a, b interface{})

Fdiff writes to w a description of the differences between a and b.

func Ldiff

func Ldiff(l Logfer, a, b interface{})

Ldiff prints to l a description of the differences between a and b. It calls Logf once for each difference, with no trailing newline. The standard library testing.T and testing.B are Logfers.

func Pdiff

func Pdiff(p Printfer, a, b interface{})

Pdiff prints to p a description of the differences between a and b. It calls Printf once for each difference, with no trailing newline. The standard library log.Logger is a Printfer.

Types

type Logfer

type Logfer interface {
	Logf(format string, a ...interface{})
}

type Printfer

type Printfer interface {
	Printf(format string, a ...interface{})
}

Jump to

Keyboard shortcuts

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