在我升级到 Go 1.4 后,godef不再在标准库中找到很多东西,例如Testing.Fatalf.当我尝试时go get -u,我收到以下错误:package code.google.com/p/goplan9/plan9/acme imports code.google.com/p/goplan9/plan9/acme imports code.google.com/p/goplan9/plan9/acme: cannot find package "code.google.com/p/goplan9/plan9/acme" in any of: /Users/bryan/local/go/src/code.google.com/p/goplan9/plan9/acme (from $GOROOT) /Users/bryan/sweng/oms/src/code.google.com/p/goplan9/plan9/acme (from $GOPATH)
2 回答
慕尼黑8549860
TA贡献1818条经验 获得超11个赞
我也遇到过同样的问题,不过我编辑了 godef.go。
--- a/exp/cmd/godef/godef.go 2015-01-19 15:29:10.760304470 -0500
+++ b/exp/cmd/godef/godef.go 2015-02-10 21:36:29.678102962 -0500
@@ -47,7 +47,7 @@
}
r := runtime.GOROOT()
if r != "" {
- gopath = append(gopath, r+"/src/pkg")
+ gopath = append(gopath, r+"/src")
}
types.GoPath = gopath
}
- 2 回答
- 0 关注
- 179 浏览
添加回答
举报
0/150
提交
取消