-
开启module
$env:GO111MODULE="on"
-
设置代理
$env:GOPROXY="https://mirrors.aliyun.com/goproxy/"
-
创建目录及main.go
-
初始化mod:
go mod init helloworld
-
构建运行
go build /go run main.go
注意:设置代理紧针对当前窗口(?)
参考:
https://segmentfault.com/a/1190000016703769
https://juejin.im/post/5d8ee2db6fb9a04e0b0d9c8b
https://studygolang.com/articles/21414
https://learnku.com/go/wikis/38122
网友评论