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

Method Requirements

cf/commands/auth.go:41–52  ·  view source on GitHub ↗
(requirementsFactory requirements.Factory, fc flags.FlagContext)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 4

CommandUsageMethod · 0.80
ArgsMethod · 0.65
FailedMethod · 0.65

Tested by

no test coverage detected