MCPcopy Create free account
hub / github.com/kataras/iris / removeDuplicates

Function removeDuplicates

core/router/api_builder.go:818–830  ·  view source on GitHub ↗
(elements []string)

Source from the content-addressed store, hash-verified

816}
817
818func removeDuplicates(elements []string) (result []string) {
819 seen := make(map[string]struct{})
820
821 for v := range elements {
822 val := elements[v]
823 if _, ok := seen[val]; !ok {
824 seen[val] = struct{}{}
825 result = append(result, val)
826 }
827 }
828
829 return result
830}
831
832// Party returns a new child Party which inherites its
833// parent's options and middlewares.

Callers 2

RegisterMethodsFunction · 0.70
createRoutesMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…