Signed-off-by: David Calavera <david.calavera@gmail.com>
| 1 | 1 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,8 @@ |
| 0 |
+package lib |
|
| 1 |
+ |
|
| 2 |
+// ContainerUnpause resumes the process execution within a container |
|
| 3 |
+func (cli *Client) ContainerUnpause(containerID string) error {
|
|
| 4 |
+ resp, err := cli.POST("/containers/"+containerID+"/unpause", nil, nil, nil)
|
|
| 5 |
+ ensureReaderClosed(resp) |
|
| 6 |
+ return err |
|
| 7 |
+} |
| ... | ... |
@@ -18,7 +18,7 @@ func (cli *DockerCli) CmdUnpause(args ...string) error {
|
| 18 | 18 |
|
| 19 | 19 |
var errNames []string |
| 20 | 20 |
for _, name := range cmd.Args() {
|
| 21 |
- if _, _, err := readBody(cli.call("POST", fmt.Sprintf("/containers/%s/unpause", name), nil, nil)); err != nil {
|
|
| 21 |
+ if err := cli.client.ContainerUnpause(name); err != nil {
|
|
| 22 | 22 |
fmt.Fprintf(cli.err, "%s\n", err) |
| 23 | 23 |
errNames = append(errNames, name) |
| 24 | 24 |
} else {
|