3rf / codecoroner

tool for detecting unused functions and variables in Go source code
http://kyleerf.com
141 stars 22 forks source link

Support list in GOPATH #3

Closed sethwklein closed 9 years ago

sethwklein commented 9 years ago

This is built atop #2 which is required to build at all.

GOPATH is not a single directory. It is a list in the format of filepath.SplitList. See http://golang.org/pkg/go/build/#hdr-Go_Path.

I suspect the proper solution is a larger change. As a user, I would expect to give go-unused-funcs the same thing I might give to go get. However, this change gets it working for those of us with multiple directories in our GOPATH's.