Skip to content

A package for running subprocesses in Go, similar to Python's subprocesses package.

License

Notifications You must be signed in to change notification settings

almost/subprocess

 
 

Repository files navigation

Subprocesses

Spawn subprocesses in Go.

Sanitized mode

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)
	}
}

Shell mode

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)
	}
}

About

A package for running subprocesses in Go, similar to Python's subprocesses package.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 99.0%
  • Makefile 1.0%