解决goland不能识别GOROOT
对于golang版本大于1.15,可能在配置Goland的时候会有加载不了GOROOT的情况,这个时候需要修改一个文件 go/src/runtime/internal/sys/zversion.go:
// Code generated by go tool dist; DO NOT EDIT.
package sys
const StackGuardMultiplierDefault = 1
const theVersion = `go1.18`
原文链接:www.jianshu.com/p/7a2bcfa5f…
golang运行报错不能找到包
执行:
go mod init