mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-29 13:21:10 +00:00
75513575be
* store dependency's in git * since we vendor ... rm tech-depts * aad make target 'vendor' to update vendor folder (manual task)
16 lines
443 B
Go
16 lines
443 B
Go
package docker // import "docker.io/go-docker"
|
|
|
|
import (
|
|
"net/url"
|
|
|
|
"golang.org/x/net/context"
|
|
)
|
|
|
|
// ContainerRename changes the name of a given container.
|
|
func (cli *Client) ContainerRename(ctx context.Context, containerID, newContainerName string) error {
|
|
query := url.Values{}
|
|
query.Set("name", newContainerName)
|
|
resp, err := cli.post(ctx, "/containers/"+containerID+"/rename", query, nil, nil)
|
|
ensureReaderClosed(resp)
|
|
return err
|
|
}
|