Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CopyMap ¶
func CopyMap[K comparable, V any](src map[K]V) map[K]V
CopyMap returns an independent shallow copy of src. Returns nil if src is nil.
func CopySlice ¶
func CopySlice[T any](src []T) []T
CopySlice returns an independent copy of src. Returns nil if src is nil.
func MarshalField ¶
func MarshalField(v interface{}) (json.RawMessage, error)
MarshalField marshals v to json.RawMessage for store persistence. Returns an error so callers can abort the write rather than silently storing malformed JSON.
func UnmarshalField ¶
UnmarshalField unmarshals raw JSON data into the target pointer. Returns a wrapped error with context suitable for store methods.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.