gpt4 book ai didi

go get命令不提供输出也不生效

转载 作者:IT王子 更新时间:2023-10-29 01:26:32 25 4
gpt4 key购买 nike

我已经在我的 mac 上安装了 go

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"

当我运行以下 go get 命令时:

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

它既不生成任何输出也不做任何事情。什么都没发生。

更新1

在 GOPATH/pkg 文件夹中有 darwin_amd64 文件夹,在 darwin_amd64 文件夹中有

github.com/miku/esbulk.a

最佳答案

$ 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
$

关于go get命令不提供输出也不生效,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43717803/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com