看來倉庫已經從golang.org/x/tools/astutil
搬到golang.org/x/tools/go/ast/astutil
正確方法golang.org/x/tools/go/ast/astutil
我試圖建立gore
但它無法找到astutil
,我有解決方法,讓它編譯:
mkdir $GOPATH/src/golang.org/x/tools/go/ast
ln -s $GOPATH/src/golang.org/x/tools/astutil $GOPATH/src/golang.org/x/tools/go/ast
但是這是解決這個問題的正確方法嗎?
我試圖刪除x/tools
目錄,並再次把它拿來,使用這個命令:
rm -rf $GOPATH/src/golang.org/x/tools
go get -u -v golang.org/x/tools
但仍astutil
在同一目錄(x/tools/go/astutil
),而不是x/tools/go/ast/astutil
我試着到go get -u -v golang.org/x/tools/go/ast/astutil
但似乎不工作:
Fetching https://golang.org/x/tools/go/ast/astutil?go-get=1
Parsing meta tags from https://golang.org/x/tools/go/ast/astutil?go-get=1
(status code 200)
get "golang.org/x/tools/go/ast/astutil?": found meta tag
main.metaImport{Prefix:"golang.org/x/tools", VCS:"git", RepoRoot:"
https://go.googlesource.com/tools"} at
https://golang.org/x/tools/go/ast/astutil?go-get=1
get "golang.org/x/tools/go/ast/astutil?": verifying non-authoritative meta
tag
Fetching https://golang.org/x/tools?go-get=1
Parsing meta tags from https://golang.org/x/tools?go-get=1 (status code 200)
golang.org/x/tools (download)
package golang.org/x/tools/go/ast/astutil?: /home/asd/Dropbox/go/src/
golang.org/x/tools exists but /home/asd/Dropbox/go/src/
golang.org/x/tools/.git does not - stale checkout?
什麼是正確的WA喲解決這個問題?
我去版本:go version go1.4.1 linux/amd64
正如我所說的,一個新鮮的GOPATH更好:從以前的一組依賴沒有副作用。 – VonC 2015-02-24 08:15:58