Version: v0.0.0-...-38a27ef Latest Latest

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

Go to latest
Published: Mar 13, 2023 License: Apache-2.0 Imports: 9 Imported by: 4




This section is empty.


This section is empty.


func ObjectDiff

func ObjectDiff(a, b interface{}) string

ObjectDiff writes the two objects out as JSON and prints out the identical part of the objects followed by the remaining part of 'a' and finally the remaining part of 'b'. For debugging tests.

func ObjectGoPrintDiff

func ObjectGoPrintDiff(a, b interface{}) string

ObjectGoPrintDiff is like ObjectDiff, but uses go-spew to print the objects, which shows absolutely everything by recursing into every single pointer (go's %#v formatters OTOH stop at a certain point). This is needed when you can't figure out why reflect.DeepEqual is returning false and nothing is showing you differences. This will.

func ObjectGoPrintSideBySide

func ObjectGoPrintSideBySide(a, b interface{}) string

ObjectGoPrintSideBySide prints a and b as textual dumps side by side, enabling easy visual scanning for mismatches.

func ObjectReflectDiff

func ObjectReflectDiff(a, b interface{}) string

ObjectReflectDiff returns a diff computed through reflection, without serializing to JSON.

func StringDiff

func StringDiff(a, b string) string

StringDiff diffs a and b and returns a human readable diff.


This section is empty.

Source Files

Jump to

Keyboard shortcuts

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