# awalterschulze/goderive

Derives and generates mundane golang functions that you do not want to maintain yourself

Repository: https://github.com/awalterschulze/goderive
Canonical: https://ross.abutalabs.com/products/goderive
Language: Go
License: Apache-2.0
License Family: permissive
Topics: golang, generator, deriving, functional-programming, generics
Last push: 2026-08-24T12:14:32+00:00

## Health v2 (maintenance only)
Score: 87/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 64, longevity 100
- inputs: {"age_days": 3491, "days_push": 9, "days_rel": 29, "gap_med": 283.0, "n_releases_24m": 3}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1261, forks 45 (observed 2026-08-28T04:04:10.062019+00:00)

## What it is
goderive is a Go code generator that derives mundane functions (like Equal, Compare, DeepCopy, Sort, Hash) from their parameter types. It parses unimplemented functions with a 'derive' prefix and generates their implementations into a derived.gen.go file.

## Use cases
- generate equality functions for Go structs
- auto-generate deep copy functions in Go
- derive sort and hash functions from types
- avoid manually maintaining boilerplate Go functions
- generate set operations like union and intersect for Go types
- derive memoization and function composition helpers

## When to choose
- you write Go and want type-derived boilerplate functions generated automatically
- you prefer generated code over reflection for performance
- you want a Haskell-style deriving workflow in Go

## When to avoid
- you prefer runtime reflection or generics-only solutions without code generation
- your project disallows generated code files
- you need dynamic behavior that cannot be derived at build time

## Facets
- artifact type: cli-tool
- maturity: active
- function: developer-tools, compiler
- domain: developer-tools, programming-languages
- platform: go, cli, cross-platform
- tags: goderive, deriving, functional-programming, generics, code-generator, boilerplate, code-generation, automation

## Member repositories
- awalterschulze/goderive (main) score 87

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:10.062019+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-30T05:04:17.564055+00:00, confidence not recorded.
  - readme: https://github.com/awalterschulze/goderive (fetched 2026-08-28T04:04:10.062019+00:00, sha 9fa376cf7303)
- Data as of 2026-08-30T08:39:29.467469+00:00.
