GitShow/BurntSushi/go-sumtype
BurntSushi

go-sumtype

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

by BurntSushi
Star on GitHubFork

Go

455 stars24 forks5 contributorsQuiet · 1y agoSince 2017Unlicense

Meet the team

See all 5 on GitHub →
BurntSushi
BurntSushi7 contributions
kujenga
kujenga4 contributions
xuxinx
xuxinx2 contributions
frou
frou1 contribution
jmquigs
jmquigs1 contribution

Languages

View on GitHub →
Go100%

Commit activity

Last 12 weeks · 0 commits

Full graph →

Community health

2 of 6 standards met

Community profile →
42
✓README✓License○Contributing○Code of Conduct○Issue Template○PR Template

Recent PRs & issues

Quiet · 2 in progress · Last activity 1y ago
See all on GitHub →
williammartin
Is there some way to make this work with generics?OpenIssue

Description Consider the following example, adapted from the README: We can see that is generic over . Late night me (i.e. not trustworthy) thinks this should lint successfully, but rejects it. I suppose that a reasonable criticism might be "how would know that is the correct concrete type for e.g. the following is valid go but we would not want it to lint: Any thoughts? Cheers!

williammartin · 2y ago
ifross89
Package analyzer as a libraryOpenPR

Fixes https://github.com/BurntSushi/go-sumtype/issues/4 Convert the go-sumtype linting logic to use the package and export an from the new package. This required a bit more of an invasive change than initially thought. The main changes were: move from package for loading the files to the new package report issues directly to the parameter, rather than collecting a list of errors use rather than a custom method: the expects a An effort was taken to do this change with the minimum amount of logic changes as possible, to reduce the chance of regression. There is, however, a minor regression: due to manually searching the go files for the comment directive, we do not have an accurate . We instead use the of the whole file which will report at the top of the file. It may be possible to craft a custom here, but I do not currently know how to do this.

ifross89 · 2y ago
davidgamero
go install vs go get in READMEOpenIssue

I believe that updating the readme to say that running for the binary would be in line with current practices https://go.dev/doc/go-get-install-deprecation

davidgamero · 3y ago

Recent fixes

View closed PRs →
gtklocker
ChangesMergedPR
gtklocker · 1y ago
xuxinx
upgrade golang.org/x/tools to latest versionMergedPR

Hi @BurntSushi , After updating my local Go version to 1.24.1, I encountered the same issue as described in https://github.com/BurntSushi/go-sumtype/issues/17. Updating x/tools to the latest version resolved the problem. Please review the PR when you have time, thanks in advance!

xuxinx · 1y ago
xuxinx
upgrade golang.org/x/tools to latest versionMergedPR

Hi @BurntSushi , After updating my local Go version to 1.24.1, I encountered the same issue as described in https://github.com/BurntSushi/go-sumtype/issues/17. Updating x/tools to the latest version resolved the problem. Please review the PR when you have time, thanks in advance!

xuxinx · 1y ago
Structured data for AI agents

Repository: BurntSushi/go-sumtype. Description: A simple utility for running exhaustiveness checks on Go "sum types." Stars: 455, Forks: 24. Primary language: Go. Languages: Go (100%). License: Unlicense. Open PRs: 2, open issues: 8. Last activity: 1y ago. Community health: 42%. Top contributors: BurntSushi, kujenga, xuxinx, frou, jmquigs.

·@ofershap

Replace github.com with gitshow.dev