MCPcopy
hub / github.com/caddyserver/caddy / mapContains

Function mapContains

caddyconfig/httpcaddyfile/httptype.go:1705–1715  ·  view source on GitHub ↗
(m map[K]V, keys []K)

Source from the content-addressed store, hash-verified

1703}
1704
1705func mapContains[K comparable, V any](m map[K]V, keys []K) bool {
1706 if len(m) == 0 || len(keys) == 0 {
1707 return false
1708 }
1709 for _, key := range keys {
1710 if _, ok := m[key]; ok {
1711 return true
1712 }
1713 }
1714 return false
1715}
1716
1717// specificity returns len(s) minus any wildcards (*) and
1718// placeholders ({...}). Basically, it's a length count

Callers 1

serversFromPairingsMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected