Skip to content

reugn/tpack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

71fb97d · Aug 31, 2024

History

21 Commits
Aug 31, 2024
Jan 4, 2021
Aug 30, 2024
Jan 4, 2021
Aug 31, 2024
Jan 4, 2021
Aug 31, 2024
Aug 31, 2024
Aug 31, 2024
Aug 30, 2024
Aug 31, 2024
Aug 30, 2024

Repository files navigation

tpack

Test PkgGoDev Go Report Card

Pack a Go workflow/function into a Unix-style pipeline command.

tpack

Wiki
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 folder.

package main

import "github.com/reugn/tpack"

func main() {
	tpack.NewPackerStd(tpack.NewProcessor(
		doETL,
	)).Execute()
}

Test command

cat input.txt | go run *.go 2>/dev/null | wc -l

License

Licensed under the MIT License.