How are YOU using generics so far?

This page summarizes the projects mentioned and recommended in the original post on /r/golang

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • infra

    Infra provides authentication and access management to servers and Kubernetes clusters.

  • tinykv

    tiny in-memory single-app kv (cache) with explicit and sliding expiration

  • I used generics for unmarshalling data structures with inner structure that was an interface{} into the generic structure Works really fine! https://github.com/acouvreur/tinykv

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • workgroup

    Discontinued Structured concurrency manager for Go

  • So far, just refactoring. I made a concurrency manager to simplify some stuff, and unified some pagination code. It’s like we said before generics: there are places you miss it, but not having it was never a total blocker. I think going working the x/slices x/maps packages will be the biggest time savers.

  • almanack

    Predicts future sports scores

  • So far, just refactoring. I made a concurrency manager to simplify some stuff, and unified some pagination code. It’s like we said before generics: there are places you miss it, but not having it was never a total blocker. I think going working the x/slices x/maps packages will be the biggest time savers.

  • workers

    Utility functions for worker pools (by skillian)

  • So far, literally just this: https://github.com/skillian/workers. Essentially just a function that gets a channel of "requests" and returns a channel of results that gets closed the then channel of requests is closed or a context is cancelled. That's literally it!

  • warg

    Declarative and Intuitive Command Line Apps with Go

  • I'm writing a CLI parsing library, and generics have let me consolidate most of the flag value functionality for different types. So the flags for dbz --level 9000 --type superSaiyan share most of the same code even though one is an int and one is a string. So much fewer copy-paste-modify lines of code now!

  • watchman

    AML/CTF/KYC/OFAC Search of global watchlist and sanctions (by moov-io)

  • Search: https://github.com/moov-io/watchman/blob/master/cmd/server/search_us_csl.go

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • infra

    Infrastructure setup for OSS moov.io and Moov Financial (by moov-io)

  • I've had to make some changes to our linter because of this. golangci-lint has disabled many of the linters, which helps until they're all updated. We've still had to force golangci-lint to use the correct Go version.

  • golangci-lint

    Fast linters Runner for Go

  • Unfortunately we are still waiting for the linters we use to be ready for 1.18.

  • cm

    Generic Go multilevel and dual maps. (by thejerf)

  • Extracting some map patterns I have been using in several projects.

  • golang-generics-dao-example

    Example using Generics with DAO

  • go-learn

    Things I learnt about go

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts