MCPcopy Index your code
hub / github.com/docker/cli / removeDuplicates

Function removeDuplicates

cli/command/service/update.go:989–999  ·  view source on GitHub ↗
(entries []T)

Source from the content-addressed store, hash-verified

987}
988
989func removeDuplicates[T comparable](entries []T) []T {
990 hit := map[T]bool{}
991 newEntries := []T{}
992 for _, v := range entries {
993 if !hit[v] {
994 newEntries = append(newEntries, v)
995 hit[v] = true
996 }
997 }
998 return newEntries
999}
1000
1001func updateDNSConfig(flags *pflag.FlagSet, config **swarm.DNSConfig) error {
1002 newConfig := &swarm.DNSConfig{}

Callers 2

updateDNSConfigFunction · 0.85
updateHostsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…