MCPcopy Create free account
hub / github.com/LissaGreense/GO4SQL / unique

Function unique

engine/engine_utils.go:35–46  ·  view source on GitHub ↗
(arr []string)

Source from the content-addressed store, hash-verified

33}
34
35func unique(arr []string) *[]string {
36 occurred := map[string]bool{}
37 var result []string
38
39 for e := range arr {
40 if !occurred[arr[e]] {
41 occurred[arr[e]] = true
42 result = append(result, arr[e])
43 }
44 }
45 return &result
46}

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected