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

Method Requirements

cf/commands/application/logs.go:43–58  ·  view source on GitHub ↗
(requirementsFactory requirements.Factory, fc flags.FlagContext)

Source from the content-addressed store, hash-verified

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