(requirementsFactory requirements.Factory, fc flags.FlagContext)
| 34 | } |
| 35 | |
| 36 | func (cmd *RenameOrg) Requirements(requirementsFactory requirements.Factory, fc flags.FlagContext) ([]requirements.Requirement, error) { |
| 37 | if len(fc.Args()) != 2 { |
| 38 | cmd.ui.Failed(T("Incorrect Usage. Requires old org name, new org name as arguments\n\n") + commandregistry.Commands.CommandUsage("rename-org")) |
| 39 | return nil, fmt.Errorf("Incorrect usage: %d arguments of %d required", len(fc.Args()), 2) |
| 40 | } |
| 41 | |
| 42 | cmd.orgReq = requirementsFactory.NewOrganizationRequirement(fc.Args()[0]) |
| 43 | |
| 44 | reqs := []requirements.Requirement{ |
| 45 | requirementsFactory.NewLoginRequirement(), |
| 46 | cmd.orgReq, |
| 47 | } |
| 48 | |
| 49 | return reqs, nil |
| 50 | } |
| 51 | |
| 52 | func (cmd *RenameOrg) SetDependency(deps commandregistry.Dependency, pluginCall bool) commandregistry.Command { |
| 53 | cmd.ui = deps.UI |
nothing calls this directly
no test coverage detected