Documentation
¶
Overview ¶
Package merge provides generic helpers for merging slices by identity key.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ByKey ¶
ByKey merges two slices by identity key. For entries with a non-empty key (returned by keyFn), a custom entry that shares a key with a base entry triggers onCollide(base, custom); the return value replaces the base entry. Custom entries with no matching base key are appended. Non-keyed entries (empty key) are always appended. Duplicate keys within custom are collapsed; the first occurrence takes effect.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.