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

Method displayRoleGroup

command/v7/space_users_command.go:65–83  ·  view source on GitHub ↗
(usersWithRole []resources.User, roleLabel string)

Source from the content-addressed store, hash-verified

63}
64
65func (cmd SpaceUsersCommand) displayRoleGroup(usersWithRole []resources.User, roleLabel string) {
66 v7action.SortUsers(usersWithRole)
67
68 cmd.UI.DisplayHeader(roleLabel)
69 if len(usersWithRole) > 0 {
70 for _, userWithRole := range usersWithRole {
71 cmd.UI.DisplayText(" {{.PresentationName}} ({{.Origin}})", map[string]interface{}{
72 "PresentationName": userWithRole.PresentationName,
73 "Origin": v7action.GetHumanReadableOrigin(userWithRole),
74 })
75 }
76 } else {
77 cmd.UI.DisplayText(" No {{.RoleLabel}} found", map[string]interface{}{
78 "RoleLabel": roleLabel,
79 })
80 }
81
82 cmd.UI.DisplayNewline()
83}

Callers 1

displaySpaceUsersMethod · 0.95

Calls 5

SortUsersFunction · 0.92
GetHumanReadableOriginFunction · 0.92
DisplayHeaderMethod · 0.65
DisplayTextMethod · 0.65
DisplayNewlineMethod · 0.65

Tested by

no test coverage detected