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

Function authSliceToMap

internal/watcher/clients.go:321–330  ·  view source on GitHub ↗
(auths []*coreauth.Auth)

Source from the content-addressed store, hash-verified

319}
320
321func authSliceToMap(auths []*coreauth.Auth) map[string]*coreauth.Auth {
322 byID := make(map[string]*coreauth.Auth, len(auths))
323 for _, a := range auths {
324 if a == nil || strings.TrimSpace(a.ID) == "" {
325 continue
326 }
327 byID[a.ID] = a
328 }
329 return byID
330}
331
332func authIDSet(auths map[string]*coreauth.Auth) map[string]*coreauth.Auth {
333 set := make(map[string]*coreauth.Auth, len(auths))

Callers 3

reloadClientsMethod · 0.85
TestAuthSliceToMapFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestAuthSliceToMapFunction · 0.68