GoPaths高效Go包索引工具指南
GoPaths 是一个Go包索引器,可用于在 GOROOT 和 GOPATH 目录中搜索 Go包。通过该工具,您可以使用完整路径来响应较短的包路径,适合与 cd 和 godoc 命令结合使用,从而提高开发效率。
安装
$ go get github.com/pietv/gopaths
$ go install github.com/pietv/gopaths
使用方法
- 启动服务:
$ gopaths -http=:6118 &
- 搜索包
使用以下命令来搜索特定包路径:
$ curl :6118/imports/log
google.golang.org/appengine/internal/log
google.golang.org/appengine/log
- 搜索包含包的目录
查找包含指定包的目录路径:
$ curl :6118/dirs/rand
/Users/peter/go/src/crypto/rand
/Users/peter/go/src/
下载地址
用户评论