go-pipeline

  • Owner: mattn/go-pipeline
  • Platform:
  • License:: MIT License
  • Category::
  • Topic:
  • Like:
    0
      Compare:

Github stars Tracking Chart

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)

Main metrics

Overview
Name With Ownermattn/go-pipeline
Primary LanguageGo
Program languageGo (Language Count: 1)
Platform
License:MIT License
所有者活动
Created At2015-10-30 04:10:23
Pushed At2020-07-27 08:59:30
Last Commit At2019-03-23 23:45:19
Release Count0
用户参与
Stargazers Count151
Watchers Count3
Fork Count5
Commits Count14
Has Issues Enabled
Issues Count1
Issue Open Count0
Pull Requests Count2
Pull Requests Open Count0
Pull Requests Close Count1
项目设置
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private