> If I want to start from the executables in $GOPATH/bin and recompile only > those, is there a way to tell what package an executable comes from so I can > easily automate the process? E.g. goimports is the result of "go install > golang.org/x/tools/cmd/goimports", etc.
you can do it by listing the target and import path or directory for each package and filter out the executables you're interested in. 'go help list' gives you a lot of options. example: go list -f '{{.Dir}}: {{.Target}}' all | grep yourbinaryfile or, to see the import path for every binary in your GOPATH/bin: go list -f '{{.ImportPath}}: {{.Target}}' all | grep $GOPARH/bin -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.