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

Method Requirements

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

Source from the content-addressed store, hash-verified

42}
43
44func (cmd *OneTimeSSHCode) Requirements(requirementsFactory requirements.Factory, fc flags.FlagContext) ([]requirements.Requirement, error) {
45 usageReq := requirements.NewUsageRequirement(commandregistry.CLICommandUsagePresenter(cmd),
46 T("No argument required"),
47 func() bool {
48 return len(fc.Args()) != 0
49 },
50 )
51
52 reqs := []requirements.Requirement{
53 usageReq,
54 requirementsFactory.NewAPIEndpointRequirement(),
55 }
56
57 return reqs, nil
58}
59
60func (cmd *OneTimeSSHCode) SetDependency(deps commandregistry.Dependency, _ bool) commandregistry.Command {
61 cmd.ui = deps.UI

Callers

nothing calls this directly

Calls 4

NewUsageRequirementFunction · 0.92
CLICommandUsagePresenterFunction · 0.92
ArgsMethod · 0.65

Tested by

no test coverage detected