setOrg sets organization
()
| 99 | |
| 100 | // setOrg sets organization |
| 101 | func (cmd *TargetCommand) setOrg() error { |
| 102 | org, warnings, err := cmd.Actor.GetOrganizationByName(cmd.Organization) |
| 103 | cmd.UI.DisplayWarnings(warnings) |
| 104 | if err != nil { |
| 105 | return err |
| 106 | } |
| 107 | |
| 108 | cmd.Config.SetOrganizationInformation(org.GUID, cmd.Organization) |
| 109 | cmd.Config.UnsetSpaceInformation() |
| 110 | |
| 111 | return nil |
| 112 | } |
| 113 | |
| 114 | // autoTargetSpace targets the space if there is only one space in the org |
| 115 | // and no space arg was provided. |
no test coverage detected