After I upgraded to Go 1.4, godef
is no longer finding many things in the standard libraries, for instance Testing.Fatalf
.
When I try to go get -u
, I get these errors:
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)
I had to edit this file because a dependency has moved:
--- a/exp/cmd/godef/acme.go
+++ b/exp/cmd/godef/acme.go
@@ -1,7 +1,7 @@
package main
import (
- "code.google.com/p/goplan9/plan9/acme"
+ "9fans.net/go/acme"
"fmt"
"io"
"os"
Then go build
and go install
and all working great once more.
I've experienced the same issue, I edited godef.go though.
--- 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
}