Pack a Go workflow/function as a Unix-style pipeline command

Overview

tpack

Test Status PkgGoDev Go Report Card

Pack a Go workflow/function as 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.

Examples

See ETL workflow in the examples folder.

package main

import "github.com/reugn/tpack"

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

Test command

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

License

Licensed under the MIT License.

You might also like...
PickleShell - best shell for unix-like os
PickleShell - best shell for unix-like os

🥒 PickleShell shell for super users Compilation Windows go build -o PickleShell.exe

NYAGOS - The hybrid Commandline Shell between UNIX & DOS
NYAGOS - The hybrid Commandline Shell between UNIX & DOS

The Nihongo Yet Another GOing Shell English / Japanese NYAGOS is the commandline-shell written with the Programming Language GO and Lua. There are som

Drop-in replacement for Go's flag package, implementing POSIX/GNU-style --flags.

Description pflag is a drop-in replacement for Go's flag package, implementing POSIX/GNU-style --flags. pflag is compatible with the GNU extensions to

Advanced ANSI style & color support for your terminal applications
Advanced ANSI style & color support for your terminal applications

termenv lets you safely use advanced styling options on the terminal. It gathers information about the terminal environment in terms of its ANSI & col

Style definitions for nice terminal layouts 👄
Style definitions for nice terminal layouts 👄

Lip Gloss Style definitions for nice terminal layouts. Built with TUIs in mind. Lip Gloss takes an expressive, declarative approach to terminal render

GitHub CLI extension to preview your markdown similar to the style of GitHub.
GitHub CLI extension to preview your markdown similar to the style of GitHub.

gh markdown-preview GitHub CLI extension to preview your markdown similar to the style of GitHub gh markdown-preview is a GitHub CLI extension to prev

Clirunner - Package clirunner runs a legacy shell-style CLI as if a human were running it.

clirunner Package clirunner runs a legacy shell-style command-line interpreter (CLI) as if a human were running it. A shell-style CLI offers a prompt

Make any Go function into a API (FaaS)

faas Make any (Go) function into an API with one HTTP request. This is a FaaS: functions as a service. But, in actuality, its more of a FaaSSS: functi

A sample FaaS function that gets a stock quote and 30 day history by symbol and returns a HTML page with a generates SVG sparkline.

faas stonks This uses serverless technology to get a stock quote and 30 day sparkline from Yahoo Finance. Deployment Nimbella account Namespace with o

A go library for easy configure and run command chains. Such like pipelining in unix shells.

go-command-chain A go library for easy configure and run command chains. Such like pipelining in unix shells. Example cat log_file.txt | grep error |

null 37 Dec 27, 2022
A command line tool for quickly converting Unix timestamps to human readable form.

stamp A command line tool to quickly format a Unix timestamp in a human-readable form. Installation Go is required to build this software. To just bui

Ricco Førgaard 1 Oct 30, 2021
A command line utility that automagically replaces UNIX timestamps with human interpretable timestamps.

Unfy unfy is a command line utility that automagically identifies and translated UNIX timestamps (since epoch) to human readable timestamps. Example B

Jens Rantil 41 Oct 22, 2022
Build command for lambda function

Build command for lambda function GOOS=linux GOARCH=amd64 go build -o main main.go logger.go get_csv.go DynamoDBCreateItem.go #Local Development sam l

David Davila 0 Nov 15, 2021
Free5GC Network Function (NF) Command Line Interface (CLI)

NFCLI free5GC Network Function (NF) Command Line Interface (CLI) based on Thrift Thrift Installation Steps Donwload Thrift 0.15.0 ./bootstrap.sh ./con

Muthuraman Elangovan 0 Jan 11, 2022
Go library to simplify CLI workflow

This is a simple Go library to manage commands for your CLI tool. Easy to use and now you can focus on Business Logic instead of building the command

Balazs Nadasdi 31 Dec 22, 2022
An Alfred Workflow for the Johnny.Decimal filing system

alfred-jd An Alfred Workflow for the Johnny.Decimal filing system This workflow provides tools for working with the brilliant Johnny.Decimal filing sy

bsag 24 Dec 26, 2022
The slightly more awesome standard unix password manager for teams

gopass Introduction gopass is a password manager for the command line written in Go. It supports all major operating systems (Linux, MacOS, BSD) as we

Gopass 5k Jan 4, 2023
A modern UNIX ed (line editor) clone written in Go

ed (the awesome UNIX line editor) ed is a clone of the UNIX command-line tool by the same name ed a line editor that was nortorious for being and most

James Mills 45 May 29, 2021
Guillaume J. Charmes 1.3k Jan 6, 2023