MCPcopy
hub / github.com/cloudfoundry/cli / Requirements

Method Requirements

cf/commands/curl.go:67–78  ·  view source on GitHub ↗
(requirementsFactory requirements.Factory, fc flags.FlagContext)

Source from the content-addressed store, hash-verified

65}
66
67func (cmd *Curl) Requirements(requirementsFactory requirements.Factory, fc flags.FlagContext) ([]requirements.Requirement, error) {
68 if len(fc.Args()) != 1 {
69 cmd.ui.Failed(T("Incorrect Usage. An argument is missing or not correctly enclosed.\n\n") + commandregistry.Commands.CommandUsage("curl"))
70 return nil, fmt.Errorf("Incorrect usage: %d arguments of %d required", len(fc.Args()), 1)
71 }
72
73 reqs := []requirements.Requirement{
74 requirementsFactory.NewAPIEndpointRequirement(),
75 }
76
77 return reqs, nil
78}
79
80func (cmd *Curl) SetDependency(deps commandregistry.Dependency, pluginCall bool) commandregistry.Command {
81 cmd.ui = deps.UI

Callers

nothing calls this directly

Calls 4

CommandUsageMethod · 0.80
ArgsMethod · 0.65
FailedMethod · 0.65

Tested by

no test coverage detected