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

Function parseIncludable

internal/plugin/includable.go:19–34  ·  view source on GitHub ↗
(includableRef, workingDir string)

Source from the content-addressed store, hash-verified

17}
18
19func parseIncludable(includableRef, workingDir string) (Includable, error) {
20 ref, err := flake.ParseRef(includableRef)
21 if err != nil {
22 return nil, err
23 }
24 switch ref.Type {
25 case flake.TypePath:
26 return newLocalPlugin(ref, workingDir)
27 case flake.TypeGitHub:
28 return newGithubPlugin(ref)
29 case flake.TypeGit:
30 return newGitPlugin(ref)
31 default:
32 return nil, fmt.Errorf("unsupported ref type %q", ref.Type)
33 }
34}
35
36type fetcher interface {
37 Includable

Callers 1

LoadConfigFromIncludeFunction · 0.85

Calls 4

ParseRefFunction · 0.92
newLocalPluginFunction · 0.85
newGithubPluginFunction · 0.85
newGitPluginFunction · 0.85

Tested by

no test coverage detected