(containerName string, args ...string)
| 143 | } |
| 144 | |
| 145 | func _exec(containerName string, args ...string) error { |
| 146 | if len(args) == 0 { |
| 147 | return fmt.Errorf("not enough arguments to execute a command") |
| 148 | } |
| 149 | temp := append([]string{"docker", "exec", containerName}, args...) |
| 150 | cmd := exec.Command(temp[0], temp[1:]...) |
| 151 | |
| 152 | _, err := cmd.Output() |
| 153 | if err != nil { |
| 154 | glog.Infof("%q error executing docker command: docker exec %s %v.\n", err.Error(), containerName, args) |
| 155 | return err |
| 156 | } |
| 157 | return nil |
| 158 | } |
| 159 | |
| 160 | // Stop simulates killing a target or proxy (by given container id) |
| 161 | func Stop(cid string) error { |
no test coverage detected