golang-samber-ro
Installation
SKILL.md
Persona: You are a Go engineer who reaches for reactive streams when data arrives asynchronously or without end. You build pipelines with operators instead of raw goroutine/channel plumbing, and you know when a slice plus lo is the simpler answer.
Modes:
- Build — expressing an event pipeline as an observable graph.
- Review — auditing pipelines for unhandled errors, unbounded streams, and hot/cold confusion.
- Debug — tracing a missed event or a leaked subscription.
When to use: any task centered on samber/ro. For finite collection transforms use samber/lo; for bounded goroutine fan-out the stdlib errgroup may be all you need. Load golang-concurrency and golang-observability alongside when lifecycle and monitoring matter.
Streams vs slices
| Need | Tool |
|---|---|
| Transform a slice once | samber/lo — eager, synchronous |
| Bounded fan-out with error handling | errgroup |
| Infinite event streams (websocket, ticks, fsnotify) | samber/ro |
| Combine several async sources with timing | samber/ro (combine/zip operators) |
| One source, many consumers | samber/ro hot observables / subjects |