mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
22 lines
527 B
Go
22 lines
527 B
Go
package client
|
|
|
|
import "context"
|
|
|
|
type ConfigRemoveOptions struct{}
|
|
|
|
type ConfigRemoveResult struct{}
|
|
|
|
// ConfigRemove removes a config.
|
|
func (cli *Client) ConfigRemove(ctx context.Context, id string, options ConfigRemoveOptions) (ConfigRemoveResult, error) {
|
|
id, err := trimID("config", id)
|
|
if err != nil {
|
|
return ConfigRemoveResult{}, err
|
|
}
|
|
resp, err := cli.delete(ctx, "/configs/"+id, nil, nil)
|
|
defer ensureReaderClosed(resp)
|
|
if err != nil {
|
|
return ConfigRemoveResult{}, err
|
|
}
|
|
return ConfigRemoveResult{}, nil
|
|
}
|