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

Method Requirements

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

Source from the content-addressed store, hash-verified

76}
77
78func (cmd *Start) Requirements(requirementsFactory requirements.Factory, fc flags.FlagContext) ([]requirements.Requirement, error) {
79 if len(fc.Args()) != 1 {
80 cmd.ui.Failed(T("Incorrect Usage. Requires an argument\n\n") + commandregistry.Commands.CommandUsage("start"))
81 return nil, fmt.Errorf("Incorrect usage: %d arguments of %d required", len(fc.Args()), 1)
82 }
83
84 cmd.appReq = requirementsFactory.NewApplicationRequirement(fc.Args()[0])
85
86 reqs := []requirements.Requirement{
87 requirementsFactory.NewLoginRequirement(),
88 requirementsFactory.NewTargetedSpaceRequirement(),
89 cmd.appReq,
90 }
91
92 return reqs, nil
93}
94
95func (cmd *Start) SetDependency(deps commandregistry.Dependency, pluginCall bool) commandregistry.Command {
96 cmd.ui = deps.UI

Callers

nothing calls this directly

Calls 6

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

Tested by

no test coverage detected