goimport问题
来源:1-3 国内镜像配置

慕粉4417634
2021-08-31
老师我系统windows10我下的go版本是go1.17 windows/amd64
但是我在安装goimports 报了这么个错,有影响吗
C:\Users\liuyl38>go get -v golang.org/x/tools/cmd/goimports
go: downloading golang.org/x/tools v0.1.5
go: downloading golang.org/x/sys v0.0.0-20210510120138-977fb7262007
go: downloading golang.org/x/mod v0.4.2
go: downloading golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1
go get: installing executables with ‘go get’ in module mode is deprecated.
Use ‘go install pkg@version’ instead.
For more information, see https://golang.org/doc/go-get-install-deprecation
or run ‘go help get’ or ‘go help install’.*
golang.org/x/mod/semver
golang.org/x/xerrors/internal
golang.org/x/tools/internal/fastwalk
golang.org/x/tools/internal/event/label
golang.org/x/sys/execabs
golang.org/x/xerrors
golang.org/x/tools/internal/typeparams
golang.org/x/tools/internal/gopathwalk
golang.org/x/tools/internal/event/keys
golang.org/x/tools/go/ast/astutil
golang.org/x/mod/module
golang.org/x/tools/internal/event/core
golang.org/x/tools/internal/event
golang.org/x/tools/internal/gocommand
golang.org/x/tools/internal/imports
golang.org/x/tools/cmd/goimports
1回答
-
它是说我们现在推荐使用go install来安装了。把命令改为:
go install golang.org/x/tools/cmd/goimports 当然用go get也可以,这只是个警告。
012021-09-01
相似问题