InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now. Learn more →
Top 23 Go Generic Projects
-
Might be interesting to make a library that competes with https://github.com/samber/lo?
-
InfluxDB
InfluxDB – Built for High-Performance Time Series Workloads. InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.
-
-
golang-set
A simple, battle-tested and generic set type for the Go language. Trusted by Docker, 1Password, Ethereum and Hashicorp.
-
-
rueidis
A fast Golang Redis client that supports Client Side Caching, Auto Pipelining, Generics OM, RedisJSON, RedisBloom, RediSearch, etc.
It's important to note that it's possible to use any Redis-compatible client with Valkey. I used the go-redis client, but (at the time of writing) there is work underway to build Valkey specific client libraries. Check the Valkey GitHub org to take look at the forks of existing Redis client libraries such as valkey-go (corresponding to rueidis), iovalkey (corresponding to ioredis), Jackey (corresponding to jedis) etc. These are very early days (at the time of writing), and it will be interesting to see the progress here!
-
Project mention: Faster interpreters in Go: Catching up with C++ | news.ycombinator.com | 2025-04-05
do a type analysis on each expression you want to "compile" to a closure, and instantiate the correct closure for each type combination.
Here is a pseudocode example, adapted from https://github.com/cosmos72/gomacro/blob/2ff796e3da1057c005c...
/* return a closure that computes x + y when executed /
-
Project mention: Do: A dependency injection toolkit based on Go 1.18 Generics | news.ycombinator.com | 2024-07-24
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
-
pie
🍕 Enjoy a slice! A utility library for dealing with slices and maps that focuses on type safety and performance. (by elliotchance)
-
To simplify the worker implementation, we'll use rill, a concurrency toolkit I’ve built. It provides utilities like rill.Batch, which groups incoming items into batches with a timeout (exactly as described earlier), and rill.ForEach, which helps control the level of concurrency when processing those batches. Thanks to these tools, the worker implementation becomes remarkably compact.
-
-
Not sure how I didn't find this before, but https://github.com/zyedidia/generic looks like a decent library.
Although there are some decent libraries out there for this kind of thing, my complaint mostly stems from the fact that a lot of existing code doesn't involve generics yet.
I think I remember skimming an article about for range loops on Hacker News a while back, but again, my main complaint is still that existing code exists in a way that doesn't incorporate all these new features yet.
-
-
-
go-generics-cache
A key:value store/cache library written in Go generics. LRU, LFU, FIFO, MRU, Clock support.
-
-
-
-
-
kod
A generics based dependency injection application framework for Go, supporting aspect oriented programming based on interceptors (by go-kod)
-
korm
KORM, an elegant and lightning-fast ORM for all your concurrent and async needs. Inspired by the highly popular Django Framework, KORM offers similar functionality with the added bonus of performance
-
-
-
gostream
A Go port of the Java Streams API. Type-safe and functional Go Streams processing for Go 1.18+.
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
Go Generics discussion
Go Generics related posts
-
1BRC Coding Challenge: Nerd Sniping the Java Community
-
Fun with Go Iterators
-
SwissTable: A High-Performance Hash Table Implementation
-
One Billion Row Challenge in Golang - From 95s to 1.96s
-
Golang Port of Abseil's SwissTable
-
Go is not an easy language (2021)
-
v3.1.0 of ttlcache - an in-memory cache with item expiration and generics
-
A note from our sponsor - InfluxDB
www.influxdata.com | 18 Jun 2025
Index
What are some of the best open-source Generic projects in Go? This list will help you:
# | Project | Stars |
---|---|---|
1 | lo | 19,557 |
2 | lancet | 5,050 |
3 | golang-set | 4,527 |
4 | mo | 2,996 |
5 | rueidis | 2,691 |
6 | gomacro | 2,244 |
7 | do | 2,138 |
8 | pie | 2,002 |
9 | rill | 1,677 |
10 | gen | 1,427 |
11 | generic | 1,302 |
12 | goderive | 1,260 |
13 | ttlcache | 1,062 |
14 | go-generics-cache | 478 |
15 | enum | 424 |
16 | genesis | 349 |
17 | async | 248 |
18 | go-optional | 194 |
19 | kod | 185 |
20 | korm | 182 |
21 | functools | 172 |
22 | assert | 161 |
23 | gostream | 161 |