运行 "go doc" 导致 "no such tool" 错误

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

我 运行 遇到了一个非常奇怪的问题,尽管我确信解决方案很简单,但我在网上找不到任何关于此的信息。尝试对任何参数集使用 go doc <args...> 总是会导致错误:

go tool: no such tool "doc"

尽管 doc 出现在 go helpgo help doc 的命令输出中,提供了 go doc.

的文档和用法

这是怎么回事?我什至尝试从 golang.org 下载 tar.gz 包,因为我想我用 pacman 安装的版本可能不好,但解压缩的 go 也有同样的问题(与,当然,适当修改 GOPATH).

问题是因为我的go系统版本是gccgo v1.10.3 - 安装go v1.11.4解决了这个问题。