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

Method displayTarget

command/v7/api_command.go:95–107  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

93}
94
95func (cmd *APICommand) displayTarget() error {
96 cmd.UI.DisplayKeyValueTable("", [][]string{
97 {cmd.UI.TranslateText("API endpoint:"), cmd.Config.Target()},
98 {cmd.UI.TranslateText("API version:"), cmd.Config.APIVersion()},
99 }, 3)
100
101 user, err := cmd.Config.CurrentUser()
102 if user.Name == "" {
103 cmd.UI.DisplayNewline()
104 command.DisplayNotLoggedInText(cmd.Config.BinaryName(), cmd.UI)
105 }
106 return err
107}

Callers 2

setAPIMethod · 0.95
viewTargetMethod · 0.95

Calls 8

DisplayNotLoggedInTextFunction · 0.92
DisplayKeyValueTableMethod · 0.65
TranslateTextMethod · 0.65
TargetMethod · 0.65
APIVersionMethod · 0.65
CurrentUserMethod · 0.65
DisplayNewlineMethod · 0.65
BinaryNameMethod · 0.65

Tested by

no test coverage detected