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

Method normalizeProviders

sdk/cliproxy/auth/conductor.go:3259–3277  ·  view source on GitHub ↗
(providers []string)

Source from the content-addressed store, hash-verified

3257}
3258
3259func (m *Manager) normalizeProviders(providers []string) []string {
3260 if len(providers) == 0 {
3261 return nil
3262 }
3263 result := make([]string, 0, len(providers))
3264 seen := make(map[string]struct{}, len(providers))
3265 for _, provider := range providers {
3266 p := strings.TrimSpace(strings.ToLower(provider))
3267 if p == "" {
3268 continue
3269 }
3270 if _, ok := seen[p]; ok {
3271 continue
3272 }
3273 seen[p] = struct{}{}
3274 result = append(result, p)
3275 }
3276 return result
3277}
3278
3279// AvailableProviders returns the set of provider keys that currently have at least one
3280// registered auth record that is not disabled. It is a best-effort snapshot for routing

Callers 3

ExecuteMethod · 0.95
ExecuteCountMethod · 0.95
ExecuteStreamMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected