maputil

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MergePatchStringMap added in v0.17.2

func MergePatchStringMap(original map[string]string, patch map[string]any) map[string]string

MergePatchStringMap applies RFC 7396 JSON merge-patch semantics to a map[string]string. The patch uses map[string]interface{} to preserve null values:

  • nil value means delete the key
  • non-nil value is converted to string and set

Returns nil when all keys are removed (consistent with Go zero-value conventions).

func MergeStringMaps

func MergeStringMaps(original, input map[string]string) map[string]string

MergeStringMaps merges two string maps, with input taking precedence over original. This is useful for partial updates where we want to merge new values with existing ones.

Types

This section is empty.

Jump to

Keyboard shortcuts

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