blob: 1fe2a32b6f2ec06f8436dc6bbd3b74f754059bcc (
plain)
1
2
3
4
5
6
7
8
9
|
package exercises
import "os/exec"
func Run(exercise string) (string, error) {
cmd := exec.Command("go", "run", "./exercises/"+exercise+".go")
cOut, err := cmd.CombinedOutput()
return string(cOut), err
}
|