MCPcopy
hub / github.com/spf13/cobra / getCommand

Function getCommand

args_test.go:23–33  ·  view source on GitHub ↗
(args PositionalArgs, withValid bool)

Source from the content-addressed store, hash-verified

21)
22
23func getCommand(args PositionalArgs, withValid bool) *Command {
24 c := &Command{
25 Use: "c",
26 Args: args,
27 Run: emptyRun,
28 }
29 if withValid {
30 c.ValidArgs = []string{"one", "two", "three"}
31 }
32 return c
33}
34
35func expectSuccess(output string, err error, t *testing.T) {
36 if output != "" {

Calls

no outgoing calls

Tested by

no test coverage detected