当前位置:网站首页>Error: note: module requires go 1.17

Error: note: module requires go 1.17

2022-06-22 05:43:00 weixin_ forty-six million two hundred and seventy-two thousand

error message

PS D:\syz\study\computer_science\Go\workspaces\src\study-code\web_app> go run .\main.go
# golang.org/x/net/http2
..\..\..\pkg\mod\golang.org\x\[email protected]\http2\transport.go:416:45: und
efined: os.ErrDeadlineExceeded
note: module requires Go 1.17

By prompting , I need to download it GO 1.17

download Go 1.17

Need to set up GOROOT environment variable , Just take the folder you installed . For example, I downloaded Go 1.17 Put it in Go 1.17 Under the folder .

image-20220605022210310

after , open cmd, Input go version, You can see Go Language version

Reconfiguration GoLand

I was in GoLand Write down the , And my GoLand default GOROOT It's the old version , So I need to reset GOROOT route .

At this point, the running program is successfully compiled

image-20220605022128985

原网站

版权声明
本文为[weixin_ forty-six million two hundred and seventy-two thousand ]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/173/202206220529488501.html