// Create a group func CreateGroupClient(c *api.Client, groupName string) (*GroupClient, error) { body, _, err := c.CreateGroup(groupName) if err != nil { return nil, err } g := GroupClient{APIClient: c} err = json.Unmarshal(body, &g.Desc) if err != nil { return nil, errors.New("Unable to unmarshal created group") } return &g, nil }