MCPcopy Create free account
hub / github.com/cloudfoundry/cli / Requirements

Method Requirements

cf/commands/service/delete_service.go:42–54  ·  view source on GitHub ↗
(requirementsFactory requirements.Factory, fc flags.FlagContext)

Source from the content-addressed store, hash-verified

40}
41
42func (cmd *DeleteService) Requirements(requirementsFactory requirements.Factory, fc flags.FlagContext) ([]requirements.Requirement, error) {
43 if len(fc.Args()) != 1 {
44 cmd.ui.Failed(T("Incorrect Usage. Requires an argument\n\n") + commandregistry.Commands.CommandUsage("delete-service"))
45 return nil, fmt.Errorf("Incorrect usage: %d arguments of %d required", len(fc.Args()), 1)
46 }
47
48 reqs := []requirements.Requirement{
49 requirementsFactory.NewLoginRequirement(),
50 requirementsFactory.NewTargetedSpaceRequirement(),
51 }
52
53 return reqs, nil
54}
55
56func (cmd *DeleteService) SetDependency(deps commandregistry.Dependency, pluginCall bool) commandregistry.Command {
57 cmd.ui = deps.UI

Callers

nothing calls this directly

Calls 5

CommandUsageMethod · 0.80
ArgsMethod · 0.65
FailedMethod · 0.65
NewLoginRequirementMethod · 0.65

Tested by

no test coverage detected