MCPcopy Index your code
hub / github.com/cloudfoundry/cli / Requirements

Method Requirements

cf/commands/stack.go:40–51  ·  view source on GitHub ↗
(requirementsFactory requirements.Factory, fc flags.FlagContext)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 4

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

Tested by

no test coverage detected