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

Method Requirements

cf/commands/organization/org.go:45–59  ·  view source on GitHub ↗
(requirementsFactory requirements.Factory, fc flags.FlagContext)

Source from the content-addressed store, hash-verified

43}
44
45func (cmd *ShowOrg) Requirements(requirementsFactory requirements.Factory, fc flags.FlagContext) ([]requirements.Requirement, error) {
46 if len(fc.Args()) != 1 {
47 cmd.ui.Failed(T("Incorrect Usage. Requires an argument\n\n") + commandregistry.Commands.CommandUsage("org"))
48 return nil, fmt.Errorf("Incorrect usage: %d arguments of %d required", len(fc.Args()), 1)
49 }
50
51 cmd.orgReq = requirementsFactory.NewOrganizationRequirement(fc.Args()[0])
52
53 reqs := []requirements.Requirement{
54 requirementsFactory.NewLoginRequirement(),
55 cmd.orgReq,
56 }
57
58 return reqs, nil
59}
60
61func (cmd *ShowOrg) SetDependency(deps commandregistry.Dependency, pluginCall bool) commandregistry.Command {
62 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