2017-03-16 01:04:32 +03:00
|
|
|
package client
|
|
|
|
|
|
|
|
import "golang.org/x/net/context"
|
|
|
|
|
|
|
|
// ConfigRemove removes a Config.
|
|
|
|
func (cli *Client) ConfigRemove(ctx context.Context, id string) error {
|
2017-06-07 19:09:07 +03:00
|
|
|
if err := cli.NewVersionError("1.30", "config remove"); err != nil {
|
|
|
|
return err
|
|
|
|
}
|
2017-03-16 01:04:32 +03:00
|
|
|
resp, err := cli.delete(ctx, "/configs/"+id, nil, nil)
|
|
|
|
ensureReaderClosed(resp)
|
2017-09-08 19:04:34 +03:00
|
|
|
return wrapResponseError(err, resp, "config", id)
|
2017-03-16 01:04:32 +03:00
|
|
|
}
|