请在提交问题之前回答这些问题。 谢谢!
go version
)?go version go1.6.3 linux/amd64
go env
)?CentOS Linux release 7.1.1503 (Core)
[root<strong i="14">@nc</strong> go]# go env
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/root/go"
GORACE=""
GOROOT="/usr/lib/golang"
GOTOOLDIR="/usr/lib/golang/pkg/tool/linux_amd64"
GO15VENDOREXPERIMENT="1"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0"
CXX="g++"
CGO_ENABLED="1"
[root<strong i="15">@nc</strong> go]# go version
go version go1.6.3 linux/amd64
如果可能,请提供重现错误的方法。
一个完整的可运行程序是好的。
play.golang.org 上的链接是最好的。
我收到golang.org/x/tools/cmd/oracle
但失败了。
我想获取并构建golang.org/x/tools/cmd/oracle
。
[root<strong i="28">@nc</strong> go]# go get golang.org/x/tools/cmd/oracle
package golang.org/x/tools/cmd/oracle: cannot find package "golang.org/x/tools/cmd/oracle" in any of:
/usr/lib/golang/src/golang.org/x/tools/cmd/oracle (from $GOROOT)
/root/go/src/golang.org/x/tools/cmd/oracle (from $GOPATH)
[root<strong i="29">@nc</strong> go]#
[root<strong i="30">@nc</strong> go]# go get -u -v golang.org/x/tools/cmd/oracle
Fetching https://golang.org/x/tools/cmd/oracle?go-get=1
Parsing meta tags from https://golang.org/x/tools/cmd/oracle?go-get=1 (status code 200)
get "golang.org/x/tools/cmd/oracle": found meta tag main.metaImport{Prefix:"golang.org/x/tools", VCS:"git", RepoRoot:"https://go.googlesource.com/tools"} at https://golang.org/
x/tools/cmd/oracle?go-get=1
get "golang.org/x/tools/cmd/oracle": 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/cmd/oracle: cannot find package "golang.org/x/tools/cmd/oracle" in any of:
/usr/lib/golang/src/golang.org/x/tools/cmd/oracle (from $GOROOT)
/root/go/src/golang.org/x/tools/cmd/oracle (from $GOPATH)
最有用的评论
它更名为“大师”。
https://godoc.org/golang.org/x/tools/cmd/guru