MCPcopy
hub / github.com/danielmiessler/Fabric / init

Function init

internal/plugins/template/template.go:25–33  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

23var extensionManager *ExtensionManager
24
25func init() {
26 homedir, err := os.UserHomeDir()
27 if err != nil {
28 debugf("Warning: could not initialize extension manager: %v\n", err)
29 }
30 configDir := filepath.Join(homedir, ".config/fabric")
31 extensionManager = NewExtensionManager(configDir)
32 // Extensions will work if registry exists, otherwise they'll just fail gracefully
33}
34
35var pluginPattern = regexp.MustCompile(`\{\{plugin:([^:]+):([^:]+)(?::([^}]+))?\}\}`)
36var extensionPattern = regexp.MustCompile(`\{\{ext:([^:]+):([^:]+)(?::([^}]+))?\}\}`)

Callers

nothing calls this directly

Calls 2

debugfFunction · 0.85
NewExtensionManagerFunction · 0.85

Tested by

no test coverage detected