forked from toolshed/abra
We were running behind and there were quite some deprecations to update. This was mostly in the upstream copy/pasta package but seems quite minimal.
15 lines
416 B
Go
15 lines
416 B
Go
package client // import "github.com/docker/docker/client"
|
|
|
|
import "context"
|
|
|
|
// NetworkRemove removes an existent network from the docker host.
|
|
func (cli *Client) NetworkRemove(ctx context.Context, networkID string) error {
|
|
networkID, err := trimID("network", networkID)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
resp, err := cli.delete(ctx, "/networks/"+networkID, nil, nil)
|
|
defer ensureReaderClosed(resp)
|
|
return err
|
|
}
|