MCPcopy Create free account
hub / github.com/cloudfoundry/cli / Execute

Method Execute

command/v7/logout_command.go:30–46  ·  view source on GitHub ↗
(args []string)

Source from the content-addressed store, hash-verified

28}
29
30func (cmd LogoutCommand) Execute(args []string) error {
31 user, err := cmd.Actor.GetCurrentUser()
32 if err != nil {
33 return err
34 }
35
36 cmd.UI.DisplayTextWithFlavor("Logging out {{.Username}}...",
37 map[string]interface{}{
38 "Username": user.Name,
39 })
40
41 cmd.Actor.RevokeAccessAndRefreshTokens() //nolint:errcheck
42 cmd.Config.UnsetUserInformation()
43 cmd.UI.DisplayOK()
44
45 return nil
46}

Callers

nothing calls this directly

Calls 5

GetCurrentUserMethod · 0.65
DisplayTextWithFlavorMethod · 0.65
UnsetUserInformationMethod · 0.65
DisplayOKMethod · 0.65

Tested by

no test coverage detected