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

Function labelFor

internal/store/postgresstore.go:655–669  ·  view source on GitHub ↗
(metadata map[string]any)

Source from the content-addressed store, hash-verified

653}
654
655func labelFor(metadata map[string]any) string {
656 if metadata == nil {
657 return ""
658 }
659 if v := strings.TrimSpace(valueAsString(metadata["label"])); v != "" {
660 return v
661 }
662 if v := strings.TrimSpace(valueAsString(metadata["email"])); v != "" {
663 return v
664 }
665 if v := strings.TrimSpace(valueAsString(metadata["project_id"])); v != "" {
666 return v
667 }
668 return ""
669}
670
671func normalizeAuthID(id string) string {
672 return filepath.ToSlash(filepath.Clean(id))

Callers 2

ListMethod · 0.85
readAuthFileMethod · 0.85

Calls 1

valueAsStringFunction · 0.70

Tested by

no test coverage detected