Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/reugn/tpack
Pack a Go workflow/function as a Unix-style pipeline command
https://github.com/reugn/tpack
command command-line pipe pipeline pipes shell stream unix-command workflow
Last synced: about 4 hours ago
JSON representation
Pack a Go workflow/function as a Unix-style pipeline command
- Host: GitHub
- URL: https://github.com/reugn/tpack
- Owner: reugn
- License: mit
- Created: 2019-06-16T18:49:49.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-08-31T14:17:47.000Z (3 months ago)
- Last Synced: 2024-09-19T14:13:54.270Z (about 2 months ago)
- Topics: command, command-line, pipe, pipeline, pipes, shell, stream, unix-command, workflow
- Language: Go
- Homepage: https://pkg.go.dev/github.com/reugn/tpack
- Size: 72.3 KB
- Stars: 55
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# tpack
[![Test](https://github.com/reugn/tpack/actions/workflows/test.yml/badge.svg)](https://github.com/reugn/tpack/actions/workflows/test.yml)
[![PkgGoDev](https://pkg.go.dev/badge/github.com/reugn/tpack)](https://pkg.go.dev/github.com/reugn/tpack)
[![Go Report Card](https://goreportcard.com/badge/github.com/reugn/tpack)](https://goreportcard.com/report/github.com/reugn/tpack)Pack a Go workflow/function into a Unix-style pipeline command.
![tpack](./docs/images/tpack.png)
> [Wiki](https://en.wikipedia.org/wiki/Pipeline_(Unix))
> In Unix-like computer operating systems, a pipeline is a mechanism for inter-process communication using message passing. A pipeline is a set of processes chained together by their standard streams, so that the output text of each process (stdout) is passed directly as input (stdin) to the next one.Use `tpack` to write Go applications that act as pipeline commands.
Employ channels, goroutines, regular expressions and more to build powerful concurrent workflows.## Usage
See the ETL workflow in the [examples](examples) folder.```go
package mainimport "github.com/reugn/tpack"
func main() {
tpack.NewPackerStd(tpack.NewProcessor(
doETL,
)).Execute()
}
```Test command
```sh
cat input.txt | go run *.go 2>/dev/null | wc -l
```## License
Licensed under the MIT License.