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

Method Requirements

cf/commands/service/update_service.go:75–87  ·  view source on GitHub ↗
(requirementsFactory requirements.Factory, fc flags.FlagContext)

Source from the content-addressed store, hash-verified

73}
74
75func (cmd *UpdateService) Requirements(requirementsFactory requirements.Factory, fc flags.FlagContext) ([]requirements.Requirement, error) {
76 if len(fc.Args()) != 1 {
77 cmd.ui.Failed(T("Incorrect Usage. Requires an argument\n\n") + commandregistry.Commands.CommandUsage("update-service"))
78 return nil, fmt.Errorf("Incorrect usage: %d arguments of %d required", len(fc.Args()), 1)
79 }
80
81 reqs := []requirements.Requirement{
82 requirementsFactory.NewLoginRequirement(),
83 requirementsFactory.NewTargetedSpaceRequirement(),
84 }
85
86 return reqs, nil
87}
88
89func (cmd *UpdateService) SetDependency(deps commandregistry.Dependency, pluginCall bool) commandregistry.Command {
90 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