“The selected directory is not a valid home for Go Sdk“

In the process of configuring the goland GOROOT SDK, the following errors have been reported:

"The selected directory is not a valid home for Go Sdk"

 

View the go version

D:\go-codes> go version
go version go1.17.3 windows/amd64

solve:

1. 在 golang 安装路径下寻找:

'go1.17.2\src\runtime\internal\sys\zversion.go' 文件

2. 打开 'zversion.go' 文件,在其中追加如下行(你的版本号)并保存

const TheVersion = `go1.17.2`

3. 再次 配置 goland 的 GOROOT 路径,即可正常配置

Guess you like

Origin blog.csdn.net/demored/article/details/124094104