8
我是新來golang,我想要一個包,但我得到一個奇怪的錯誤,似乎無法弄清楚是什麼問題?去得到錯誤 - 無法加載包
[email protected]:~/workspace-go$ echo $GOPATH
/home/padlar/workspace-go
[email protected]:~/workspace-go$ go get golang.org/x/oauth2
[email protected]:~/workspace-go$ ls ~/workspace-go/src/golang.org/x/oauth2/
AUTHORS google/ jwt_test.go README.md
CONTRIBUTORS internal/ LICENSE transport.go
example_test.go jws/ oauth2.go transport_test.go
.git/ jwt.go oauth2_test.go .travis.yml
[email protected]:~/workspace-go$ ls ~/workspace-go/pkg/linux_amd64/golang.org/x/oauth2
oauth2/ oauth2.a
[email protected]:~/workspace-go$ ls ~/workspace-go/pkg/linux_amd64/golang.org/x/oauth2/
internal.a jws.a
[email protected]:~/workspace-go$ go get github.com/golang/oauth2
can't load package: package github.com/golang/oauth2: code in directory /home/padlar/workspace-go/src/github.com/golang/oauth2 expects import "golang.org/x/oauth2"
有一個名爲'importpath'的項目的分支,我認爲它解決了這個問題。自述文件指出這是一項正在進行的工作,所以我猜它還沒有完成。只需從舊路徑導入它。 – 2014-12-07 15:23:08
您是否已經嘗試運行'go get -u -a',它會更新所有依賴項(強制更新)? – 2014-12-07 15:25:21