mapx

package
v1.11.8 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2026 License: Apache-2.0 Imports: 3 Imported by: 3

Documentation

Overview

Package mapx provides generic helpers for creating, cloning, merging, and querying maps and set-maps.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloneMapStringSlice

func CloneMapStringSlice(src map[string][]string) map[string][]string

CloneMapStringSlice clones a map[string][]string, skipping blank keys

func DeepCloneMapAny

func DeepCloneMapAny(src map[string]any) map[string]any

DeepCloneMapAny creates a deep copy of a map[string]any

func DeepMergeMapAny

func DeepMergeMapAny(base, override map[string]any) map[string]any

DeepMergeMapAny deep-merges override onto base, recursing into nested map[string]any values

func MapIntersectionUnique

func MapIntersectionUnique[T comparable](left, right []T) []T

MapIntersectionUnique returns items present in both slices, in right-hand order, with duplicates removed

func MapSetFromSlice

func MapSetFromSlice[T comparable](items []T) map[T]struct{}

MapSetFromSlice converts a slice into a set represented as map[T]struct{}

func PruneMapZeroAny

func PruneMapZeroAny(src map[string]any) map[string]any

PruneMapZeroAny removes zero-value leaves from a nested map[string]any

Types

This section is empty.

Jump to

Keyboard shortcuts

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