diff

package module
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2024 License: MIT Imports: 6 Imported by: 1

README

Diff

GoDoc

Simple high-level diff package. Primarily used for testing.

License

MIT

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Content

func Content(actual, expect string) error

Content returns the difference in content between actual and expect

func Diff

func Diff(actual, expect interface{}) error

Diff two interfaces

func HTTP

func HTTP(actual, expect string) error

HTTP diffs two response dumps via httputil.DumpResponse

func String

func String(actual, expect string) error

String diffs two strings

func Test

func Test(t testing.TB, actual, expect interface{})

Test tests actual with expected

func TestContent

func TestContent(t testing.TB, actual, expect interface{})

Test the content of actual with expected

func TestHTTP

func TestHTTP(t testing.TB, actual, expect string)

TestHTTP diffs two HTTP dumps from httputil.DumpResponse

func TestString

func TestString(t testing.TB, actual string, expect string)

TestString diffs two strings

Types

type Error

type Error struct {
	Actual, Expect, Diff string
}

func (*Error) Error

func (e *Error) Error() string

Jump to

Keyboard shortcuts

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