dqqfuth6736 2013-07-13 10:06
浏览 33
已采纳

如何搜索Go文档?

The documentation is great, but sometimes it is hard to find a specific keyword. For instance, searching for Next()results in this page http://golang.org/search?q=next%28%29 which is not very helpful. Is there a better way to search the documentation?

  • 写回答

3条回答 默认 最新

  • dongsuoxi1790 2013-07-13 11:00
    关注

    Rob Pike wrote the perfect tool for this. Install it with go:

    go get code.google.com/p/rspace.cmd/doc
    

    You can then say doc next (or doc Next) and get an awesome list of Next functions in all packages, along with their documentations and signature. If you know the name of the package, you can say doc sql next or doc sql.next. You can even pass -url to get URL of that documentation online, or -src to get file name and line number for the implementation of that symbol.

    You can access package documentation (documentation that appears at the top of a package’s page and doesn’t belong to any of its items) with -pkg: doc -pkg json.

    doc searches for everything and you can limit it to only search for functions, interfaces, variables, etc. Run it without arguments to get the docs.

    It’s such a great tool. Keep it close when you’re writing in Go.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥15 微信公众号自制会员卡没有收款渠道啊
  • ¥15 stable diffusion
  • ¥100 Jenkins自动化部署—悬赏100元
  • ¥15 关于#python#的问题:求帮写python代码
  • ¥20 MATLAB画图图形出现上下震荡的线条
  • ¥15 关于#windows#的问题:怎么用WIN 11系统的电脑 克隆WIN NT3.51-4.0系统的硬盘
  • ¥15 perl MISA分析p3_in脚本出错
  • ¥15 k8s部署jupyterlab,jupyterlab保存不了文件
  • ¥15 ubuntu虚拟机打包apk错误
  • ¥199 rust编程架构设计的方案 有偿