在GoLand的运行/调试配置窗口中,"Go tool arguments“的-i选项是什么?

发布于 2021-05-18 00:47:49
摘自go help build
The -i flag installs the packages that are dependencies of the target.
The -i flag is deprecated. Compiled packages are cached automatically.发布于 2021-10-31 16:14:24
您在使用它时会收到一条消息:
go生成:-i标志已弃用
-i构建标志
go build、go install和go test接受的-i标志现在已弃用。-i标志指示go命令安装由命令行中指定的包导入的包。由于构建缓存是在Go 1.10中引入的,因此-i标志对构建时间不再有显著影响,并且当安装目录不可写时,它会导致错误。
所以它的存在现在已经无关紧要了,你可以从参数中删除这个标志
https://stackoverflow.com/questions/67573771
复制相似问题