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

Function LoadConfig

pkg/resource_provider.go:62–72  ·  view source on GitHub ↗

LoadConfig loads config bytes from the external provider first, then from the embedded templates kept for standalone spray compatibility.

(typ string)

Source from the content-addressed store, hash-verified

60// LoadConfig loads config bytes from the external provider first, then from
61// the embedded templates kept for standalone spray compatibility.
62func LoadConfig(typ string) []byte {
63 resourceProvider.RLock()
64 provider := resourceProvider.fn
65 resourceProvider.RUnlock()
66 if provider != nil {
67 if data := provider(typ); len(data) > 0 {
68 return data
69 }
70 }
71 return loadEmbeddedConfig(typ)
72}

Callers 6

LoadNeutronTemplatesFunction · 0.70
LoadPortsFunction · 0.70
LoadFingersFunction · 0.70
LoadTemplatesFunction · 0.70
LoadProtonRulesFunction · 0.70
LoadFoundKeysFunction · 0.70

Calls 1

loadEmbeddedConfigFunction · 0.70

Tested by

no test coverage detected