| 62 | } |
| 63 | |
| 64 | func renderTeamGroups(out io.Writer, groups []*team_common.GroupSummary) error { |
| 65 | if len(groups) == 0 { |
| 66 | return nil |
| 67 | } |
| 68 | |
| 69 | w := new(tabwriter.Writer) |
| 70 | w.Init(out, 4, 8, 1, ' ', 0) |
| 71 | fmt.Fprintf(w, "Name\tId\t# Members\tExternal Id\n") |
| 72 | for _, group := range groups { |
| 73 | fmt.Fprintf(w, "%s\t%s\t%d\t%s\n", group.GroupName, group.GroupId, group.MemberCount, group.GroupExternalId) |
| 74 | } |
| 75 | return w.Flush() |
| 76 | } |
| 77 | |
| 78 | // listGroupsCmd represents the list-groups command |
| 79 | var listGroupsCmd = &cobra.Command{ |