Show HN: Goutils – 70 type-safe generic functions for async/functional Go

  • Posted 13 hours ago by skatiyar
  • 3 points
https://github.com/skatiyar/goutils
I built a Go utility library inspired by the JavaScript async library, implemented idiomatically with Go 1.18+ generics. Avoids using reflection and interface{} wherever possible.

It provides ~70 functions across four packages:

Sync and Async -- map, filter, detect, reduce, every, some, reject, groupBy -- for both slices and maps. Every async function runs iteratees in goroutines with panic recovery. Concurrency limiting -- all async functions have a Limit variant that caps goroutine count via a semaphore. Worker pool -- a generic work queue with configurable buffer, concurrency, timeouts, and graceful shutdown. Control flow -- waterfall-style sequential execution with type-safe context passing.

Disclaimer: Parts of the code were generated using Claude Code. One of my goals with this project was to experiment with the latest models and see what they're capable of in a real codebase -- from writing implementations to tests to docs.

go get github.com/skatiyar/goutils@v1.0.0

Would love feedback on the API design and whether the function naming feels natural for Go.

0 comments