A lightweight generic workflow and pipeline toolkit for Go.
- Generic pipelines
- Producer / Transformer / Consumer model
- Stream processing
- Functional operators
- Iterator support
- Zero external dependencies
- Built with Go generics
go get github.com/bhaskar253/flowkit
package main
import (
"fmt"
"github.com/bhaskar253/flowkit"
)
func main() {
count := 1
pipeline := flowkit.New(
func() (int, bool) {
if count > 5 {
return 0, false
}
value := count
count++
return value, true
},
func(value int) int {
return value * value
},
func(value int) {
fmt.Println(value)
},
)
pipeline.Run()
}
Output:
1
4
9
16
25
Format:
go fmt ./...
Test:
go test ./...
Validate:
go vet ./...
Apache License 2.0