All Projects → mattn → Go Pipeline

mattn / Go Pipeline

Licence: mit

Programming Languages

go
31211 projects - #10 most used programming language

go-pipeline

unix command pipeline on golang

Usage

out, err := Output(
	[]string{"git", "log", "--oneline"},
	[]string{"grep", "first import"},
	[]string{"wc", "-l"},
)
if err != nil {
	log.Fatal(err)
}
fmt.Println(string(out))
// Output:
// 1
out, _ = CombinedOutput(
	[]string{"rmdir", "not_exist_dir"},
)
fmt.Println(string(out))
// Output:
// rmdir: failed to remove 'not_exist_dir': No such file or directory

Installation

$ go get github.com/mattn/go-pipeline

License

MIT

Author

Yasuhiro Matsumoto (a.k.a mattn)

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].