client-gok8s.io/client-go/pkg/util/diff Index | Files

package diff

import "k8s.io/client-go/pkg/util/diff"

Index

Functions

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

func StringDiff

func StringDiff(a, b string) string

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

Source Files

diff.go

Version
v2.0.0-alpha.1+incompatible
Published
Dec 20, 2016
Platform
js/wasm
Imports
9 packages
Last checked
5 seconds ago

Tools for package owners.