MCPcopy Create free account
hub / github.com/DOSNetwork/core / unique

Function unique

dosnode/dosnode.go:234–244  ·  view source on GitHub ↗
(intSlice []string)

Source from the content-addressed store, hash-verified

232}
233
234func unique(intSlice []string) []string {
235 keys := make(map[string]bool)
236 list := []string{}
237 for _, entry := range intSlice {
238 if _, value := keys[entry]; !value {
239 keys[entry] = true
240 list = append(list, entry)
241 }
242 }
243 return list
244}

Callers 1

StartMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected