# mattn/go-generics-example

Example code for Go generics

Repository: https://github.com/mattn/go-generics-example
Canonical: https://ross.abutalabs.com/products/go-generics-example
Language: Go
License Family: other
Topics: go, golang, generics, examples
Last push: 2023-07-02T12:29:22+00:00

## Health v2 (maintenance only)
Score: 32/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 1991, "days_push": 1158, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases, no_license
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1350, forks 128 (observed 2026-08-28T04:04:28.044360+00:00)

## What it is
A collection of example code demonstrating Go generics (type parameters) introduced in Go 1.18. It serves as a reference for learning how to write and use generic code in Go.

## Use cases
- learn go generics
- see examples of go type parameters
- understand how generics work in go 1.18
- find go libraries that use generics
- reference for writing generic functions in go

## When to choose
- you are learning Go generics and want runnable example code
- you want a curated list of third-party generics-based Go libraries

## When to avoid
- you need a production library rather than example code
- you are using Go earlier than 1.18
- you need comprehensive generics documentation rather than samples

## Facets
- artifact type: learning-resource
- maturity: maintenance
- function: developer-tools
- domain: programming-languages, tutorials, developer-tools
- platform: go, cross-platform
- tags: generics, go-1-18, examples, type-parameters

## Member repositories
- mattn/go-generics-example (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:28.044360+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:42:17.743117+00:00, confidence not recorded.
  - readme: https://github.com/mattn/go-generics-example (fetched 2026-08-28T04:04:28.044360+00:00, sha 3e846ec5cbda)
- Data as of 2026-08-30T08:39:29.467469+00:00.
