MCPcopy Create free account
hub / github.com/Hidden-Node/GooseRelayVPN-AndroidClient / dedupeStrings

Function dedupeStrings

internal/config/client.go:155–170  ·  view source on GitHub ↗
(values []string)

Source from the content-addressed store, hash-verified

153}
154
155func dedupeStrings(values []string) []string {
156 seen := make(map[string]struct{}, len(values))
157 out := make([]string, 0, len(values))
158 for _, v := range values {
159 v = strings.TrimSpace(v)
160 if v == "" {
161 continue
162 }
163 if _, ok := seen[v]; ok {
164 continue
165 }
166 seen[v] = struct{}{}
167 out = append(out, v)
168 }
169 return out
170}
171
172func normalizeRelayURL(v string) (string, error) {
173 v = strings.TrimSpace(v)

Callers 1

LoadClientFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected