MCPcopy Index your code
hub / github.com/jetify-com/devbox / newLocalPlugin

Function newLocalPlugin

internal/plugin/local.go:19–27  ·  view source on GitHub ↗
(ref flake.Ref, pluginDir string)

Source from the content-addressed store, hash-verified

17}
18
19func newLocalPlugin(ref flake.Ref, pluginDir string) (*LocalPlugin, error) {
20 plugin := &LocalPlugin{ref: ref, pluginDir: pluginDir}
21 name, err := getPluginNameFromContent(plugin)
22 if err != nil {
23 return nil, err
24 }
25 plugin.name = name
26 return plugin, nil
27}
28
29func (l *LocalPlugin) Fetch() ([]byte, error) {
30 content, err := os.ReadFile(addFilenameIfMissing(l.Path()))

Callers 1

parseIncludableFunction · 0.85

Calls 1

getPluginNameFromContentFunction · 0.85

Tested by

no test coverage detected