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

Function Open

internal/boxcli/multi/multi.go:13–39  ·  view source on GitHub ↗
(opts *devopt.Opts)

Source from the content-addressed store, hash-verified

11)
12
13func Open(opts *devopt.Opts) ([]*devbox.Devbox, error) {
14 defer debug.FunctionTimer().End()
15
16 var boxes []*devbox.Devbox
17 err := filepath.WalkDir(
18 ".",
19 func(path string, dirEntry fs.DirEntry, err error) error {
20 if err != nil {
21 return err
22 }
23
24 if !dirEntry.IsDir() && filepath.Base(path) == configfile.DefaultName {
25 optsCopy := *opts
26 optsCopy.Dir = path
27 box, err := devbox.Open(&optsCopy)
28 if err != nil {
29 return err
30 }
31 boxes = append(boxes, box)
32 }
33
34 return nil
35 },
36 )
37
38 return boxes, err
39}

Callers 3

updateAllProjectsFunction · 0.92
listScriptsFunction · 0.92
runScriptCmdFunction · 0.92

Calls 3

FunctionTimerFunction · 0.92
OpenFunction · 0.92
EndMethod · 0.80

Tested by

no test coverage detected