func (api *Client) CreateChildGroup(group string) (*Group, error) {
	values := url.Values{
		"token":   {api.config.token},
		"channel": {group},
	}
	response, err := groupRequest("groups.createChild", values, api.debug)
	if err != nil {
		return nil, err
	}
	return &response.Group, nil
}
CreateChildGroup creates a new private group archiving the old one
This method takes an existing private group and performs the following steps:
1. Renames the existing group (from "example" to "example-archived").
2. Archives the existing group.
3. Creates a new group with the name of the existing group.
4. Adds all members of the existing group to the new group.
package slack
import (
	"errors"
	"net/url"
	"strconv"
)
type Group struct {
	groupConversation
	IsGroup bool `json:"is_group"`
}
type groupResponseFull struct {
	Group          Group   `json:"group"`
	Groups         []Group `json:"groups"`
	Purpose        string  `json:"purpose"`
	Topic          string  `json:"topic"`
	NotInGroup     bool    `json:"not_in_group"`
	NoOp           bool    `json:"no_op"`
	AlreadyClosed  bool    `json:"already_closed"`
	AlreadyOpen    bool    `json:"already_open"`
	AlreadyInGroup bool    `json:"already_in_group"`
	Channel        Channel `json:"channel"`
	History
	SlackResponse
}
func groupRequest(path string, values url.Values, debug bool) (*groupResponseFull, error) {
	response := &groupResponseFull{}
	err := post(path, values, response, debug)
	if err != nil {
		return nil, err
	}
	if !response.Ok {
		return nil, errors.New(response.Error)
	}
	return response, nil
}
func (api *Client) ArchiveGroup(group string) error {
	values := url.Values{
		"token":   {api.config.token},
		"channel": {group},
	}
	_, err := groupRequest("groups.archive", values, api.debug)
	if err != nil {
		return err
	}
	return nil
}
func (api *Client) UnarchiveGroup(group string) error {
	values := url.Values{
		"token":   {api.config.token},
		"channel": {group},
	}
	_, err := groupRequest("groups.unarchive", values, api.debug)
	if err != nil {
		return err
	}
	return nil
}
func (api *Client) CreateGroup(group string) (*Group, error) {
	values := url.Values{
		"token": {api.config.token},
		"name":  {group},
	}
	response, err := groupRequest("groups.create", values, api.debug)
	if err != nil {
		return nil, err
	}
	return &response.Group, nil
}