Created
July 8, 2015 10:13
-
-
Save gperrudin/e2b0bf09622dea09647d to your computer and use it in GitHub Desktop.
Running shell scripts from Golang
This file contains hidden or 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
cmdStr := "thumbnail.sh " + url | |
cmd := exec.Command("/bin/sh", "-c", cmdStr) | |
_, err := cmd.Output() | |
if err != nil { | |
println(err.Error()) | |
return | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks!