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

Function matchProvider

internal/watcher/events.go:19–27  ·  view source on GitHub ↗
(provider string, targets []string)

Source from the content-addressed store, hash-verified

17)
18
19func matchProvider(provider string, targets []string) (string, bool) {
20 p := strings.ToLower(strings.TrimSpace(provider))
21 for _, t := range targets {
22 if strings.EqualFold(p, strings.TrimSpace(t)) {
23 return p, true
24 }
25 }
26 return p, false
27}
28
29func (w *Watcher) start(ctx context.Context) error {
30 if errAddConfig := w.watcher.Add(w.configPath); errAddConfig != nil {

Callers 2

reloadClientsMethod · 0.85
TestMatchProviderFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestMatchProviderFunction · 0.68