Rather than duplicate the search logic that go uses internally through the GOPATH I thought it better to use it directly from the go/build package. That approach doesn't work for uninstalled packages, so still needed to manually split GOPATH and pick the first in that case.
Tests could be a bit dryer/neater but I ran out of steam and ideas.
Rather than duplicate the search logic that go uses internally through the GOPATH I thought it better to use it directly from the
go/build
package. That approach doesn't work for uninstalled packages, so still needed to manually split GOPATH and pick the first in that case.Tests could be a bit dryer/neater but I ran out of steam and ideas.