Documentation
¶
Overview ¶
Package deepcopy provides recursive deep-copy helpers for JSON-shaped data — values decoded into map[string]any / []any trees. Copying such a tree lets a caller hand it to other code (e.g. an extension or a background goroutine) without risking mutation of, or data races on, the original.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Map ¶
Map returns a deep copy of m, recursing into nested values via Value. It returns nil if m is nil.
func Value ¶
Value returns a deep copy of v, recursing into map[string]any and []any so that no map or slice is shared between the input and the result. Scalars (strings, numbers, bools, nil) and any other types are returned as-is: they are either immutable or fall outside the JSON value model handled here.
Types ¶
This section is empty.