MCPcopy Index your code
hub / github.com/coder/coder / extractCommandPaths

Function extractCommandPaths

cli/exp_errors_test.go:73–81  ·  view source on GitHub ↗
(cmdPath []string, cmds []*serpent.Command)

Source from the content-addressed store, hash-verified

71}
72
73func extractCommandPaths(cmdPath []string, cmds []*serpent.Command) [][]string {
74 var cmdPaths [][]string
75 for _, c := range cmds {
76 cmdPath := append(cmdPath, c.Name())
77 cmdPaths = append(cmdPaths, cmdPath)
78 cmdPaths = append(cmdPaths, extractCommandPaths(cmdPath, c.Children)...)
79 }
80 return cmdPaths
81}
82
83// Must return a fresh instance of cmds each time.
84func getRoot(t *testing.T) *serpent.Command {

Callers 1

TestErrorExamplesFunction · 0.85

Calls 1

NameMethod · 0.65

Tested by

no test coverage detected