Random drive-by comment...
Another solution would be to have go install put its results in
subdirectories beneath $GOPATH/bin corresponding to source packages.
For example, considering the program goimports:
$ go get golang.org/x/tools/cmd/goimports
$ go list -f '{{.Target}}'
On Tue, Jul 18, 2017 at 7:27 AM, wrote:
>
> Consider a package with multiple binaries with the same name, "cmd" in this
> case:
>
> pkg1/cmd/main.go:
> package main; import "fmt"; func main() { fmt.Println("pkg1") }
>
> pkg2/cmd/main.go:
> package main; import "fmt";
Consider a package with multiple binaries with the same name, "cmd" in this
case:
pkg1/cmd/main.go:
package main; import "fmt"; func main() { fmt.Println("pkg1") }
pkg2/cmd/main.go:
package main; import "fmt"; func main() { fmt.Println("pkg2") }
When running
$ go install ./...
I would expect