https://github.com/open-zhy/fn-pipe
Functions pipeline for golang
https://github.com/open-zhy/fn-pipe
functions golang pipe
Last synced: 5 months ago
JSON representation
Functions pipeline for golang
- Host: GitHub
- URL: https://github.com/open-zhy/fn-pipe
- Owner: open-zhy
- License: mit
- Created: 2019-06-03T21:28:17.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2025-06-14T18:52:37.000Z (12 months ago)
- Last Synced: 2025-12-16T02:55:22.715Z (6 months ago)
- Topics: functions, golang, pipe
- Language: Go
- Size: 6.84 KB
- Stars: 1
- Watchers: 0
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# fn-pipe
[](https://circleci.com/gh/open-zhy/fn-pipe)
Functions pipeline for golang projects
## Basic Usage
```go
// create the pipeline
p, err := NewPipeline(
func(a int) (int, int) { return a + 5, a - 5 }, // fn1
func(a int, b int) int { return a * b }, // fn2
)
// error checking
if err != nil {
fmt.Fatalf("Error while creating pipeline -> %s", err)
}
// output the result which should be fn2(fn1(...args))
err, res := p.ExecWith(0) // res = [-25]
```
## Contributing
Please follow this [link](https://github.com/open-zhy/fn-pipe/blob/master/CONTRIBUTING.md)