deepdiff

package
v0.0.0-...-e91a9a7 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

The deepdiff package implements a version of reflect.DeepEquals that also returns an error message describing the first difference found.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeepDiff

func DeepDiff(a1, a2 interface{}) (bool, error)

DeepDiff tests for deep equality. It uses normal == equality where possible but will scan elements of arrays, slices, maps, and fields of structs. In maps, keys are compared with == but elements use deep equality. DeepEqual correctly handles recursive types. Functions are equal only if they are both nil. DeepEqual differs from reflect.DeepEqual in that an empty slice is equal to a nil slice, and an empty map is equal to a nil map. If the two values compare unequal, the resulting error holds the first difference encountered.

func DeepEqual

func DeepEqual(a1, a2 interface{}) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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