https://github.com/nomad-software/stream
Generic stream processors written in Go.
https://github.com/nomad-software/stream
Last synced: about 1 month ago
JSON representation
Generic stream processors written in Go.
- Host: GitHub
- URL: https://github.com/nomad-software/stream
- Owner: nomad-software
- License: mit
- Created: 2023-05-13T12:44:00.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2025-10-16T17:36:36.000Z (8 months ago)
- Last Synced: 2025-10-17T20:19:05.302Z (8 months ago)
- Language: Go
- Homepage:
- Size: 59.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# stream
**Generic stream processors written in Go**
---
## Description
This is a collection of generic, reusable, channel based stream processors that perform various operations on channels and their values. It's inspired by [component based programming](https://wiki.dlang.org/Component_programming_with_ranges) and [ranges](https://www.informit.com/articles/printerfriendly/1407357) popularised by the [D language](https://dlang.org/). Each operation is designed to be concurrent and if possible will execute in parallel. This is kind of an experiment to see how far I can leverage this. I've no idea if this is even useful.
## Example
```go
package main
import (
"os"
)
func join(a, b string) string {
return a + " " + b
}
func main() {
text := "Lorem adipiscing elit ipsum sed neque dolor non libero sit consequat magna amet placerat bibendum"
FromString(text, " ").
Stride(3).
Take(2).
Reduce(join).
WriteTo(os.Stdout)
// Output: Lorem ipsum
}
```
## Documentation
https://pkg.go.dev/github.com/nomad-software/stream