comparison

package
v0.29.0 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EqualFunc

type EqualFunc func(a, b interface{}) bool

EqualFunc is a function that implements Equalitor.

func NewHashEqualitor

func NewHashEqualitor() EqualFunc

NewHashEqualitor returns an EqualFunc that returns true if the hashes of the given arguments are equal, false otherwise.

This function panics if an error is encountered generating a hash for either argument.

func (EqualFunc) Equal

func (e EqualFunc) Equal(a, b interface{}) bool

Equal allows an EqualFunc to implement Equalitor.

type Equalitor

type Equalitor interface {
	Equal(a, b interface{}) bool
}

Equalitor describes an algorithm for equivalence between two data structures.

Jump to

Keyboard shortcuts

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