Created
May 6, 2014 00:15
-
-
Save savaki/00ff85082e0f19d7ce39 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"os/exec" | |
) | |
func main() { | |
// in this example, the offending docker code has been placed in a shell script | |
command := fmt.Sprintf("/bin/bash sample.sh") | |
fmt.Println(command) | |
data, err := exec.Command("/bin/bash", "-c", command).CombinedOutput() | |
if err != nil { | |
panic(err) | |
} | |
fmt.Println(string(data)) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment