2017-05-01 57 views
1

我已經安裝在我的Mac去影響去得到命令不提供輸出,也沒有采取

go version 

輸出:

go version go1.8.1 darwin/amd64 

go env 

輸出:

GOARCH="amd64" 
GOBIN="" 
GOEXE="" 
GOHOSTARCH="amd64" 
GOHOSTOS="darwin" 
GOOS="darwin" 
GOPATH="/Users/MYUSERNAME/go/" 
GORACE="" 
GOROOT="/usr/local/go" 
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64" 
GCCGO="gccgo" 
CC="clang" 
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/np/ts5bwp_91ns22l9h751h2j8r0000gn/T/go-build124313959=/tmp/go-build -gno-record-gcc-switches -fno-common" 
CXX="clang++" 
CGO_ENABLED="1" 
PKG_CONFIG="pkg-config" 
CGO_CFLAGS="-g -O2" 
CGO_CPPFLAGS="" 
CGO_CXXFLAGS="-g -O2" 
CGO_FFLAGS="-g -O2" 
CGO_LDFLAGS="-g -O2" 

,當我跑下面去get命令:

go get -v github.com/miku/esbulk/cmd/esbulk 

既不產生任何輸出,也沒有做任何事情。什麼都沒發生。

更新1

在GOPATH

/PKG文件夾中有darwin_amd64文件夾,文件夾darwin_amd64在有

github.com/miku/esbulk.a 
+2

你檢查什麼是你的'GOPATH/PKG內'/'GOPATH/github'文件夾? – AndreaM16

+0

如果它不輸出任何東西,那麼一切正常,你安裝了命令。 – Volker

+0

@ AndreaM16感謝您的迴應,在這裏有github.com/miku/esbulk.a。 (請參閱我的更新:)) –

回答

2
$ go help get 
usage: go get [-d] [-f] [-fix] [-insecure] [-t] [-u] [build flags] [packages] 

Get downloads the packages named by the import paths, along with their 
dependencies. It then installs the named packages, like 'go install'. 

The -u flag instructs get to use the network to update the named packages 
and their dependencies. By default, get uses the network to check out 
missing packages but does not use it to look for updates to existing packages. 

The -v flag enables verbose progress and debug output. 

$ 

如果有什麼做的那麼有沒有什麼報道。例如,當go get運行在第一次下載並安裝,之後就什麼也不做,因爲沒有什麼可以做,除非你強制更新:

$ go get -v github.com/aclements/perflock/cmd/perflock 
github.com/aclements/perflock (download) 
github.com/aclements/perflock/internal/cpupower 
github.com/aclements/perflock/cmd/perflock 
$ go get -v github.com/aclements/perflock/cmd/perflock 
$ go get -v github.com/aclements/perflock/cmd/perflock 
$ go get -v -u github.com/aclements/perflock/cmd/perflock 
github.com/aclements/perflock (download) 
$ go get -v -u github.com/aclements/perflock/cmd/perflock 
github.com/aclements/perflock (download) 
$ go get -v github.com/aclements/perflock/cmd/perflock 
$ go get -v github.com/aclements/perflock/cmd/perflock 
$