equal

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2022 License: BSD-3-Clause Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Map

func Map[K, V comparable](a, b map[K]V) bool

Map a and b are equal if they contain exactly the same keys and values.

func MapF

func MapF[K comparable, V any](a, b map[K]V, f func(V, V) bool) bool

MapF a and b are equal when len(a) == len(b), they share the same keys, and for each key k, f(a[k], b[k]) is == true.

func PointerRef

func PointerRef[T comparable](a, b *T) bool

PointerRef: (a == nil && b == nil) || (*a == *b)

func Slice

func Slice[T comparable](a, b []T) bool

Slice a and b are equal when len(a) == len(b) && ∀ i<len(a), a[i]==b[i].

func SliceF

func SliceF[T any](a, b []T, f func(T, T) bool) bool

SliceF a and b are equal when len(a) == len(b) && ∀ i<len(a), F(a[i], b[i]) == true

Types

This section is empty.

Jump to

Keyboard shortcuts

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