MCPcopy Index your code
hub / github.com/NdoleStudio/httpsms / removeStringDuplicates

Method removeStringDuplicates

api/pkg/requests/request.go:97–109  ·  view source on GitHub ↗
(values []string)

Source from the content-addressed store, hash-verified

95}
96
97func (input *request) removeStringDuplicates(values []string) []string {
98 cache := map[string]struct{}{}
99 for _, value := range values {
100 cache[value] = struct{}{}
101 }
102
103 var result []string
104 for key := range cache {
105 result = append(result, key)
106 }
107
108 return result
109}
110
111func (input *request) removeEmptyStrings(values []string) []string {
112 var result []string

Callers 1

SanitizeMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected