(ctx core.CommandContext)
| 9 | type membersListCommand struct{} |
| 10 | |
| 11 | func (c *membersListCommand) Execute(ctx core.CommandContext) error { |
| 12 | organizationID, err := core.ResolveOrganizationID(ctx) |
| 13 | if err != nil { |
| 14 | return err |
| 15 | } |
| 16 | |
| 17 | response, _, err := ctx.API.GroupsAPI. |
| 18 | GroupsListGroupUsers(ctx.Context, ctx.Args[0]). |
| 19 | DomainType(string(core.OrganizationDomainType())). |
| 20 | DomainId(organizationID). |
| 21 | Execute() |
| 22 | if err != nil { |
| 23 | return err |
| 24 | } |
| 25 | |
| 26 | users := response.GetUsers() |
| 27 | if !ctx.Renderer.IsText() { |
| 28 | return ctx.Renderer.Render(users) |
| 29 | } |
| 30 | |
| 31 | return ctx.Renderer.RenderText(func(stdout io.Writer) error { |
| 32 | return renderGroupUsersText(stdout, users) |
| 33 | }) |
| 34 | } |
nothing calls this directly
no test coverage detected