MCPcopy Index your code
hub / github.com/docker/cli / setupCobraCommands

Function setupCobraCommands

cli/command/telemetry_utils_test.go:18–32  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

16)
17
18func setupCobraCommands() (*cobra.Command, *cobra.Command, *cobra.Command) {
19 rootCmd := &cobra.Command{
20 Use: "root [OPTIONS] COMMAND [ARG...]",
21 }
22 childCmd := &cobra.Command{
23 Use: "child [OPTIONS] COMMAND [ARG...]",
24 }
25 grandchildCmd := &cobra.Command{
26 Use: "grandchild [OPTIONS] COMMAND [ARG...]",
27 }
28 childCmd.AddCommand(grandchildCmd)
29 rootCmd.AddCommand(childCmd)
30
31 return rootCmd, childCmd, grandchildCmd
32}
33
34func TestGetFullCommandName(t *testing.T) {
35 rootCmd, childCmd, grandchildCmd := setupCobraCommands()

Callers 2

TestGetFullCommandNameFunction · 0.85
TestGetCommandNameFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…