doukaojie8573 2014-10-04 10:14
浏览 70
已采纳

如何使用`godoc -http =:6060`显示内置类型?

If I start

godoc -http=:6060

and then open http://localhost:6060/pkg/builtin/#string (e.g. via a function declaration that uses string as a type somewhere), I get a big red "open /usr/local/Cellar/go/1.3.3/libexec/src/builtin: no such file or directory".

How do I get godoc to work the same way as http://golang.org/pkg/builtin/#string ?

I tried go get builtin, but that did not change anything. And DuckDuckGo and Google searches did not illuminate me either.

(I've installed Go using Homebrew on OS X.)

  • 写回答

1条回答 默认 最新

  • dsgffz2579 2014-10-04 10:28
    关注

    Godoc was updated recently to match the new internal layout of Go 1.4.

    Prior to 1.4, system packages went into $GOROOT/src/pkg/, in 1.4 (current dev version) they moved to$GOROOT/src.

    To get the pre-1.4 compatible version:

    cd $GOPATH/src/code.google.com/p/go.tools/cmd/godoc
    hg checkout -C release-branch.go1.3
    go install
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 (标签-matlab)
  • ¥15 Marscode IDE 如何预览新建的 HTML 文件
  • ¥15 K8S部署二进制集群过程中calico一直报错
  • ¥15 java python或者任何一种编程语言复刻一个网页
  • ¥20 如何通过代码传输视频到亚马逊平台
  • ¥15 php查询mysql数据库并显示至下拉列表中
  • ¥15 freertos下使用外部中断失效
  • ¥15 输入的char字符转为int类型,不是对应的ascall码,如何才能使之转换为对应ascall码?或者使输入的char字符可以正常与其他字符比较?
  • ¥15 devserver配置完 启动服务 无法访问static上的资源
  • ¥15 解决websocket跟c#客户端通信