Spawn subprocesses in Go.
package main
import (
"log"
"github.com/estebangarcia21/subprocess"
)
func main() {
s := subprocess.New("ls", subprocess.Arg("-lh"))
if err := s.Exec(); err != nil {
log.Fatal(err)
}
}
package main
import (
"log"
"github.com/estebangarcia21/subprocess"
)
func main() {
s := subprocess.New("ls -lh", subprocess.Shell)
if err := s.Exec(); err != nil {
log.Fatal(err)
}
}