MCPcopy Create free account
hub / github.com/chainreactors/EvilProxy / cloneStringSliceMap

Function cloneStringSliceMap

internal/pluginhost/auth_provider.go:68–84  ·  view source on GitHub ↗
(in map[string][]string)

Source from the content-addressed store, hash-verified

66}
67
68func cloneStringSliceMap(in map[string][]string) map[string][]string {
69 if len(in) == 0 {
70 return nil
71 }
72 out := make(map[string][]string, len(in))
73 for key, values := range in {
74 cleanKey := normalizeProviderID(key)
75 if cleanKey == "" {
76 continue
77 }
78 out[cleanKey] = cloneStringSlice(values)
79 }
80 if len(out) == 0 {
81 return nil
82 }
83 return out
84}
85
86func normalizeProviderID(provider string) string {
87 return strings.ToLower(strings.TrimSpace(provider))

Callers 1

Calls 2

normalizeProviderIDFunction · 0.85
cloneStringSliceFunction · 0.70

Tested by

no test coverage detected