BurntSushi / go-sumtype

A simple utility for running exhaustiveness checks on Go "sum types."
The Unlicense
420 stars 22 forks source link

Go modules support #10

Closed kujenga closed 5 years ago

kujenga commented 5 years ago

This PR adds support for running this tool against Go modules.

With some of the new niceties in https://godoc.org/golang.org/x/tools/go/loader there may be some opportunities for further cleanup, but I've left that alone in this PR.

Testing on my machine, this looks to now be about twice as fast!

Closes https://github.com/BurntSushi/go-sumtype/issues/8

kujenga commented 5 years ago

😄 now seeing https://github.com/BurntSushi/go-sumtype/pull/9 after opening this PR, closing this out in favor of that one.

BurntSushi commented 5 years ago

Awesome, thanks! It turns out that #9 isn't quite correct (see this comment), so I'm going to bring this one in instead!