remyoudompheng / go-misc

Miscellaneous Go toys
Other
133 stars 24 forks source link

deadcode: vars used in test are flagged as unused #2

Closed tylerstillwater closed 7 years ago

tylerstillwater commented 9 years ago

See https://github.com/tylerb/structcheck-proof for an example of code that will generate this false positive.

remyoudompheng commented 7 years ago

Hello, I have fixed this issue in a different way : after refactoring to use the go/loader package, the fix is very much simpler.