MCPcopy Create free account
hub / github.com/Mnexa-AI/e2a / dedupe

Function dedupe

internal/outbound/sender.go:372–383  ·  view source on GitHub ↗

dedupe removes duplicate addresses preserving order (case-insensitive).

(addrs []string)

Source from the content-addressed store, hash-verified

370
371// dedupe removes duplicate addresses preserving order (case-insensitive).
372func dedupe(addrs []string) []string {
373 seen := make(map[string]struct{}, len(addrs))
374 out := make([]string, 0, len(addrs))
375 for _, a := range addrs {
376 key := strings.ToLower(a)
377 if _, ok := seen[key]; !ok {
378 seen[key] = struct{}{}
379 out = append(out, a)
380 }
381 }
382 return out
383}

Callers 2

SendMethod · 0.85
TestDedupeFunction · 0.85

Calls 1

makeFunction · 0.85

Tested by 1

TestDedupeFunction · 0.68