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

Function newDummyCommand

cli/required_test.go:138–149  ·  view source on GitHub ↗
(validationFunc cobra.PositionalArgs)

Source from the content-addressed store, hash-verified

136}
137
138func newDummyCommand(validationFunc cobra.PositionalArgs) *cobra.Command {
139 cmd := &cobra.Command{
140 Use: "dummy",
141 Args: validationFunc,
142 RunE: func(cmd *cobra.Command, args []string) error {
143 return errors.New("no error")
144 },
145 }
146 cmd.SetOut(io.Discard)
147 cmd.SetErr(io.Discard)
148 return cmd
149}

Callers 5

TestRequiresNoArgsFunction · 0.85
TestRequiresMinArgsFunction · 0.85
TestRequiresMaxArgsFunction · 0.85
TestRequiresRangeArgsFunction · 0.85
TestExactArgsFunction · 0.85

Calls 2

SetOutMethod · 0.45
SetErrMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…