MCPcopy Index your code
hub / github.com/cloudfoundry/cli / setOrg

Method setOrg

command/v7/target_command.go:101–112  ·  view source on GitHub ↗

setOrg sets organization

()

Source from the content-addressed store, hash-verified

99
100// setOrg sets organization
101func (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.

Callers 2

ExecuteMethod · 0.95
setOrgAndSpaceMethod · 0.95

Calls 4

GetOrganizationByNameMethod · 0.65
DisplayWarningsMethod · 0.65
UnsetSpaceInformationMethod · 0.65

Tested by

no test coverage detected