In a directory where there is a go.mod file, you can discover the install path:
$ go list -f '{{.Target}}'
I don't come up with this, just found it at https://golang.org/doc/tutorial/compile-install .
One liner:
$ go list -f '{{.Target}}' | if xargs ls -la &> /dev/null ; then echo "Installed"; else echo "Not installed"; fi
// Outputs "Installed" or "Not installed"
Remove it:
$ go clean -i
Top comments (0)