Initial release of goutils -- a Go utility library providing approximately 70 type-safe generic functions for functional programming and concurrent control flow. Inspired by the JavaScript async library, implemented idiomatically for Go.
Highlights
- Type-safe generics -- All functions use Go 1.18+ generics. No reflection, no
interface{}at the API boundary. - Sync and concurrent variants -- Every collection operation (map, filter, detect, etc.) is available in both synchronous (
goutils) and concurrent (goutils/async) forms. - Concurrency limiting -- All async collection functions have a
Limitvariant that caps goroutine count via a semaphore, giving you fine-grained control over parallelism. - Panic recovery -- All goroutine-spawning functions recover panics and surface them as errors, preventing a single goroutine crash from taking down the process.
- Concurrent work queue -- The
queuepackage provides a generic worker pool with configurable buffer size, concurrency, timeouts, and graceful shutdown.