package
module
Version:
v0.0.0-...-c8acb90
Opens a new window with list of versions in this module.
Published: Nov 29, 2025
License: MIT
Opens a new window with license information.
Imports: 1
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Package mapdiff has some functions to diff 2 map[K]V.
-
func Diff[M ~map[K]V, K, V comparable](l1, r1 M) (l M, common M, diff map[K]Pair[V], r M)
-
func DiffFunc[M ~map[K]V, K comparable, V any](l1, r1 M, cmp func(v1, v2 V) bool) (l M, common M, diff map[K]Pair[V], r M)
-
type Pair
func Diff[M ~map[K]V, K, V comparable](l1, r1 M) (l M, common M, diff map[K]Pair[V], r M)
func DiffFunc[M ~map[K]V, K comparable, V any](l1, r1 M, cmp func(v1, v2 V) bool) (l M, common M, diff map[K]Pair[V], r M)
type Pair[V any] struct {
L, R V
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.