Have you used generics?

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

Our great sponsors
  • CodiumAI - TestGPT | Generating meaningful tests for busy devs
  • SonarLint - Clean code begins in your IDE with SonarLint
  • ONLYOFFICE ONLYOFFICE Docs — document collaboration in your environment
  • InfluxDB - Access the most powerful time series database as a service
  • genericset

    simple map-based implementation of generic set in go

    Hey there! I've finally tried generics. In most cases, I do not need them in my projects, but recently I need set and decided to implement a generic data structure. https://github.com/rutaka-n/genericset Do you have any need to use generics? especially in project code, not a library.

  • go-slices

    Process typed Go slices via generics and higher-order functions. (by tideland)

    Just releasing a flexible package for the management of slices, see https://github.com/tideland/go-slices. Especially data collections may use generics in a helpful and positive way.

  • CodiumAI

    TestGPT | Generating meaningful tests for busy devs. Get non-trivial tests (and trivial, too!) suggested right inside your IDE, so you can code smart, create more value, and stay confident when you push.

  • infra

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

    I use them frequently. see https://github.com/infrahq/infra/blob/main/internal/server/routes.go

  • bob

    SQL query builder and ORM/Factory generator for Go with support for PostgreSQL, MySQL and SQLite (by stephenafamo)

  • scan

    Scan provides the ability to to scan sql rows directly to any defined structure. (by stephenafamo)

  • be

    Generic testing helper for Go

    I made a package like that: https://github.com/carlmjohnson/be. It’s probably my most frequent use of generics.

  • warg

    Declarative and Intuitive Command Line Apps with Go

    I'm using to allow for custom flag types in my CLI parsing library- a lot less duplicate code

  • SonarLint

    Clean code begins in your IDE with SonarLint. Up your coding game and discover issues early. SonarLint is a free plugin that helps you find & fix bugs and security issues from the moment you start writing code. Install from your favorite IDE marketplace today.

  • graph

    A library for creating generic graph data structures and modifying, analyzing, and visualizing them. 一款用于创建通用图数据结构、对其进行修改、分析和可视化的库。

    I also think that especially libraries are going to be more generic, primarily libraries for generic container types and data structures. I recently created my first generic library, too (link).

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