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

Function distinctStrings

context/context.go:3110–3122  ·  view source on GitHub ↗
(values []string)

Source from the content-addressed store, hash-verified

3108}
3109
3110func distinctStrings(values []string) []string {
3111 seen := make(map[string]struct{}, len(values))
3112 result := make([]string, 0, len(values))
3113
3114 for _, val := range values {
3115 if _, ok := seen[val]; !ok {
3116 seen[val] = struct{}{}
3117 result = append(result, val)
3118 }
3119 }
3120
3121 return result
3122}
3123
3124// ReadQuery binds URL Query to "ptr". The struct field tag is "url".
3125//

Callers 1

ReadMultipartRelatedMethod · 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…