golang 编译的时候引入的外部的包会下载下来么?
时间:2023-01-19
浏览:458
作者:佚名
本篇文章给大家分享《golang 编译的时候引入的外部的包会下载下来么?》,覆盖了Golang的常见基础知识,其实一个语言的全部知识点一篇文章是不可能说完的,但希望通过这些问题,让读者对自己的掌握程度有一定的认识(B 数),从而弥补自己的不足,更好的掌握它。
问题内容
我节选其中编译输出的一段:
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)
这些外部引入的库,
- 会下载么?
- 如果下载会放在哪个目录?
Golang 新手,还请各位大兄弟指点一下。
正确答案
你这包管理用的是go module,会去下载go.mod中的不存在的依赖,下载后会放在$GOPATH/pkg/mod/
理论要掌握,实操不能落!以上关于《golang 编译的时候引入的外部的包会下载下来么?》的详细介绍,大家都掌握了吧!如果想要继续提升自己的能力,那么就来关注golang学习网公众号吧!
本文内容来源于互联网,如有侵权请联系删除。
近期热门
11.18
11.15
站内热门
最新文章
11.20
11.20
11.20
11.20
热门专题
