MCPcopy Create free account
hub / github.com/chainreactors/spray / IsProtonExtractor

Function IsProtonExtractor

pkg/proton.go:310–323  ·  view source on GitHub ↗

IsProtonExtractor checks if a name matches a proton template ID or tag.

(name string)

Source from the content-addressed store, hash-verified

308
309// IsProtonExtractor checks if a name matches a proton template ID or tag.
310func IsProtonExtractor(name string) bool {
311 protonMu.RLock()
312 defer protonMu.RUnlock()
313 if _, ok := protonTemplateMap["spray-"+name]; ok {
314 return true
315 }
316 if _, ok := protonTemplateMap[name]; ok {
317 return true
318 }
319 if _, ok := protonTagMap[name]; ok {
320 return true
321 }
322 return false
323}

Callers 7

PrepareMethod · 0.92
TestProtonTagMappingFunction · 0.85
TestProtonCategoryTagsFunction · 0.85
TestAddCustomExtractorFunction · 0.85
TestIsProtonExtractorFunction · 0.85
TestFoundKeysLoadFunction · 0.85

Calls

no outgoing calls

Tested by 6

TestProtonTagMappingFunction · 0.68
TestProtonCategoryTagsFunction · 0.68
TestAddCustomExtractorFunction · 0.68
TestIsProtonExtractorFunction · 0.68
TestFoundKeysLoadFunction · 0.68