douzang7928 2019-01-08 04:15 采纳率: 100%
浏览 66
已采纳

运行“ go doc”会导致“没有此类工具”错误

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).

  • 写回答

1条回答 默认 最新

  • duannv2081 2019-01-09 23:48
    关注

    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.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 c语言怎么用printf(“\b \b”)与getch()实现黑框里写入与删除?
  • ¥20 怎么用dlib库的算法识别小麦病虫害
  • ¥15 华为ensp模拟器中S5700交换机在配置过程中老是反复重启
  • ¥15 java写代码遇到问题,求帮助
  • ¥15 uniapp uview http 如何实现统一的请求异常信息提示?
  • ¥15 有了解d3和topogram.js库的吗?有偿请教
  • ¥100 任意维数的K均值聚类
  • ¥15 stamps做sbas-insar,时序沉降图怎么画
  • ¥15 买了个传感器,根据商家发的代码和步骤使用但是代码报错了不会改,有没有人可以看看
  • ¥15 关于#Java#的问题,如何解决?