remyoudompheng / go-misc

Miscellaneous Go toys
Other
133 stars 24 forks source link

deadcode: add support for Go modules #15

Open nmiyake opened 5 years ago

nmiyake commented 5 years ago

deadcode does not currently work with Go modules (which were introduced in Go 1.11). deadcode should use the new packages package so that it supports running on projects written as Go modules as well.

On the Golang side, this is tracked in the modules tooling issue https://github.com/golang/go/issues/24661.

nmiyake commented 5 years ago

I have a local branch that performs this conversion -- it seems to work as expected, but due to API differences in packages the change is somewhat large, and it currently requires a bit of a hack to work properly for test references due to https://github.com/golang/go/issues/27910.