升级到1.20版本后,为什么我的一半Go包在Goland中显示为红色?

huangapple go评论107阅读模式
英文:

What could be causing half of my Go packages to appear red in Goland after upgrading to version 1.20?

问题

有Go 1.17,删除了,使用Homebrew安装了1.20。按照规定的方式进行操作。但是在Goland中,一半的语言包是红色的,同样,在我的项目中也有一半是红色的...但是它可以编译没有错误并且可以正常工作。告诉我可能是什么问题?附注:在Mac上,Goland版本为22.1.4。

通过Goland重新安装GO没有起到作用,尝试了其他版本的Go(18\19),情况类似。手动更改了go.mod文件,使用"go mod edit -go 1.20"命令进行更改,但情况仍然相同...

英文:

There was Go 1.17, deleted, installed 1.20 using homebrew. prescribed ways. But in Goland half of the language package is red, respectively, and in my project half is red... but it compiles without errors and works. Tell me what could be the matter? PS: on the mac. goland version 22.1.4

Reinstalled GO by means of Goland, did not help, tried other versions of Go (18 \19) a similar situation. Changed with my hands in go.mod, changed with, go mod edit -go 1.20 - the same situation...

答案1

得分: 1

我认为您可能没有更新Goland的gopath配置。您可以按照以下步骤进行检查:在Goland编辑器中,选择文件|设置|Go|GOPATH(检查全局GOPATH 1.20)。最好在提问时附上图片。

英文:

I think you may not have updated the gopath configuration for goland.
You can check the following. In the goland editor
file|set up|go|gopath(Is the Check global gopath 1.20)
It is best to include pictures when asking questions.

huangapple
  • 本文由 发表于 2023年7月14日 16:25:31
  • 转载请务必保留本文链接:https://go.coder-hub.com/76685966.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定