golang 编译的时候引入的外部的包会下载下来么?

我节选其中编译输出的一段:

go: finding gopkg.in/yaml.v2 v2.2.1
go: finding github.com/nrdcg/dnspod-go v0.4.0
go: finding github.com/Azure/go-autorest/autorest/to v0.2.0
go: finding github.com/marten-seemann/qpack v0.1.0
go: finding github.com/francoispqt/gojay v1.2.13
go: finding github.com/mitchellh/go-vnc v0.0.0-20150629162542-723ed9867aed
go: finding github.com/konsorten/go-windows-terminal-sequences v1.0.2
go: finding github.com/kisielk/gotool v1.0.0
go: cloud.google.com/go@v0.54.0: unrecognized import path "cloud.google.com/go" (https fetch: Get https://cloud.google.com/go?go-get=1: dial tcp 216.58.200.238:443: i/o timeout)
go: finding github.com/juju/ansiterm v0.0.0-20180109212912-720a0952cc2a
go: finding github.com/pquerna/otp v1.0.0
go: finding github.com/dnsimple/dnsimple-go v0.30.0
go: go.uber.org/zap@v1.14.1: unrecognized import path "go.uber.org/zap" (https fetch: Get https://go.uber.org/zap?go-get=1: dial tcp 216.58.200.243:443: i/o timeout)
go: google.golang.org/api@v0.20.0: unrecognized import path "google.golang.org/api" (https fetch: Get https://google.golang.org/api?go-get=1: dial tcp 216.239.37.1:443: i/o timeout)

这些外部引入的库,

  1. 会下载么?
  2. 如果下载会放在哪个目录?

Golang 新手,还请各位大兄弟指点一下。

阅读 2.7k
1 个回答

你这包管理用的是go module,会去下载go.mod中的不存在的依赖,下载后会放在$GOPATH/pkg/mod/

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题