Skip to content

kylefeng28/go-shell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

go-shell

A small Go library to run shell commands.

Example:

package main

import (
	"fmt"
	. "github.com/kylefeng28/go-shell"
)

func main() {
	shell, err := NewShell("/bin/bash")
	if err != nil {
		panic("could not create shell")
	}
	defer shell.Close()

	out, err := shell.Run("echo hello world")
	if err != nil {
		panic("error execuing command")
	}

	fmt.Println(out)
}

Future features

  • stdin and stdout using channels

About

A small Go library to run shell commands

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages