Skip to content

sudix/go-then

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-then

concatenate shell commands and execute it on golang.

Requirements

This library relies on mattn's go-pipeline

Instllation

$ go get github.com/sudix/go-then

Usage

c1 := gothen.Cmd{"git", "log", "--oneline"}
c2 := gothen.Cmd{"grep", "first import"}
c3 := gothen.Cmd{"wc", "-l"}

out, err := c1.Then(c2).Then(c3).Exec()

if err != nil {
	log.Fatal(err)
}

fmt.Println(string(out))

License

MIT

About

concatenate shell commands and execute it on golang

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages