Hacker GitHub

← All repos

alecthomas/go-check-sumtype

View on GitHub ↗ ★ 59 Go

A simple utility for running exhaustiveness checks on Go "sum types."

3 mentions on Hacker News by 3 people: 0 stories, 3 comments · first 2024-07-12 · latest 2026-01-08

Mentions per year 3 mentions · busiest year 2024 (1)
20082026
  1. …defined here: https://appliedgo.net/spotlight/sum-types-in-go/ with a linter to enforce it https://github.com/alecthomas/go-check-sumtype , which is even better used as a component of golangci-lint: https://golangci-lint.run/ I'd also add…
    comment by jerf · 2026-01-08 · in An Honest Review of Go (2025)
  2. Yes, the language does not have ADT support, but there are projects that enable this, like https://github.com/alecthomas/go-check-sumtype .
    comment by p2detar · 2025-11-16 · in Go's Sweet 16
  3. There are two linters that add those checks: https://github.com/nishanths/exhaustive for values and https://github.com/alecthomas/go-check-sumtype for types. Both are integrated into golangci-lint. I use both a lot and have only a positive…
    comment by aleksi · 2024-07-12 · in Enums in Go