Search code examples
gogodoc

Running "go doc" results in "no such tool" error


I've run into a very strange issue, and even though I'm sure the solution is simple, but I can't find anything online about this. Trying to use go doc <args...> for any set of arguments always results in the error:

go tool: no such tool "doc"

despite doc showing up in the command output for go help and go help doc providing documentation of and usage for go doc.

What's going on here? I even tried downloading the tar.gz bundle from golang.org because I figured maybe the version I installed with pacman was bad, but the unzipped go also had the same issue (with, of course, a properly altered GOPATH).


Solution

  • The problem was caused by the fact that my system version of go was gccgo v1.10.3 - installing go v1.11.4 resolved the issue.