Categorygithub.com/flimzy/diff
modulepackage
0.1.7
Repository: https://github.com/flimzy/diff.git
Documentation: pkg.go.dev

# README

Build Status Codecov GoDoc

diff

This is a simple package to facilitate Go testing of various deeply nested data types.

License

This package is released under the terms of the MIT license. See the included LICENSE.txt for details.

# Functions

AsJSON marshals two objects as JSON, then compares the output.
DirChecksum compares the checksum of the contents of dir against the checksums in expected.
DirFullCheck compares the checksum of the contents of dir against the checksums in expected.
HTTPRequest compares the metadata and bodies of the two HTTP requests, and returns the difference.
HTTPResponse compares the metadata and bodies of the two HTTP responses, and returns the difference.
Interface compares two objects with reflect.DeepEqual, and if they differ, it returns a diff of the spew.Dump() outputs.
JSON unmarshals two JSON strings, then calls AsJSON on them.
Text compares two strings, line-by-line, for differences.
TextSlices compares two slices of text, treating each element as a line of text.

# Constants

UpdateMode indicates whether a detected diff should cause a File to be overwritten.

# Structs

File converts a file into an io.Reader.
Result is the result of a diff function.