Refactor to add oci and util packages

Signed-off-by: Mrunal Patel <mrunalp@gmail.com>

Change the sandbox directory path

Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
This commit is contained in:
Mrunal Patel 2016-07-29 15:35:10 -07:00
parent 839463d837
commit ac1340488d
7 changed files with 101 additions and 76 deletions

19
utils/utils.go Normal file
View file

@ -0,0 +1,19 @@
package utils
import (
"bytes"
"os/exec"
)
func ExecCmd(name string, args ...string) (string, error) {
cmd := exec.Command(name, args...)
var out bytes.Buffer
cmd.Stdout = &out
err := cmd.Run()
if err != nil {
return "", err
}
return out.String(), nil
}