(existing map[string]any, incoming map[string]any)
| 710 | } |
| 711 | |
| 712 | func mergeCommandOtherEvents(existing map[string]any, incoming map[string]any) map[string]any { |
| 713 | if len(existing) == 0 { |
| 714 | return incoming |
| 715 | } |
| 716 | if len(incoming) == 0 { |
| 717 | return existing |
| 718 | } |
| 719 | merged := maps.Clone(existing) |
| 720 | for eventName, incomingValue := range incoming { |
| 721 | if existingValue, hasExisting := merged[eventName]; hasExisting { |
| 722 | merged[eventName] = mergeEventConfig(existingValue, incomingValue) |
| 723 | continue |
| 724 | } |
| 725 | merged[eventName] = incomingValue |
| 726 | } |
| 727 | return merged |
| 728 | } |
| 729 | |
| 730 | func mergeEventConfig(existing any, incoming any) any { |
| 731 | existingMap, existingOK := existing.(map[string]any) |
no test coverage detected