2018-02-05 16:05:59 -05:00
|
|
|
package client // import "github.com/docker/docker/client"
|
2017-03-15 18:04:32 -04:00
|
|
|
|
2018-04-19 18:30:59 -04:00
|
|
|
import "context"
|
2017-03-15 18:04:32 -04:00
|
|
|
|
|
|
|
// ConfigRemove removes a Config.
|
|
|
|
func (cli *Client) ConfigRemove(ctx context.Context, id string) error {
|
2017-06-07 12:09:07 -04:00
|
|
|
if err := cli.NewVersionError("1.30", "config remove"); err != nil {
|
|
|
|
return err
|
|
|
|
}
|
2017-03-15 18:04:32 -04:00
|
|
|
resp, err := cli.delete(ctx, "/configs/"+id, nil, nil)
|
|
|
|
ensureReaderClosed(resp)
|
2017-09-08 12:04:34 -04:00
|
|
|
return wrapResponseError(err, resp, "config", id)
|
2017-03-15 18:04:32 -04:00
|
|
|
}
|