I was wondering if there was a way to pass the contents of exec.Command a template file in golang. My template file is static. Currently, I use code that looks like this
cmd = exec.Command("/bin/sh", shellScript)
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr
cmd.Run()
which works great if I want to view the server shell to see output from running that shell script.. Now i want to take it a step further and push the output of that shell script to my index.html. I could store the contents of the process in a string and pass it in... but i was thinking something more real time. Any ideas, etc?