summaryrefslogtreecommitdiff
path: root/client/config_remove.go
blob: 93de0d8445b552a3f85ae0590417dffa6782ca3d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
package client // import "github.com/docker/docker/client"

import "context"

// ConfigRemove removes a config.
func (cli *Client) ConfigRemove(ctx context.Context, id string) error {
	if err := cli.NewVersionError("1.30", "config remove"); err != nil {
		return err
	}
	resp, err := cli.delete(ctx, "/configs/"+id, nil, nil)
	defer ensureReaderClosed(resp)
	return wrapResponseError(err, resp, "config", id)
}