MCPcopy Create free account
hub / github.com/dropbox/dbxcli / listGroups

Function listGroups

cmd/list-groups.go:28–41  ·  view source on GitHub ↗
(cmd *cobra.Command, args []string)

Source from the content-addressed store, hash-verified

26)
27
28func listGroups(cmd *cobra.Command, args []string) (err error) {
29 dbx := teamNewFunc(config)
30 arg := team.NewGroupsListArg()
31 groups, err := listTeamGroups(dbx, arg)
32 if err != nil {
33 return err
34 }
35
36 commandVerboseStatus(cmd, "Listed %d team groups", len(groups))
37
38 return commandOutput(cmd).Render(func(w io.Writer) error {
39 return renderTeamGroups(w, groups)
40 }, newJSONCommandOperationOutput(cmd, teamInfoInput{}, teamGroupOperationResults(groups), nil))
41}
42
43func listTeamGroups(dbx teamClient, arg *team.GroupsListArg) ([]*team_common.GroupSummary, error) {
44 var groups []*team_common.GroupSummary

Callers 1

Calls 7

listTeamGroupsFunction · 0.85
commandVerboseStatusFunction · 0.85
commandOutputFunction · 0.85
renderTeamGroupsFunction · 0.85
RenderMethod · 0.80

Tested by 1