源码网址:下载地址https://go.dev/dl/
我这边下载的是go的解压版源码
go1.24.0.windows-amd64.msi
安装
配置go的环境变量
GOROOT:安装地址如D:\go
GOPATH:项目地址
在path新增环境变量
%GOROOT%/bin
%GOPATH%
命令查看版本--go -version
下载https://code.visualstudio.com/
visual Studio
在visual Studio 安装插件
Ctr+Shift+X 搜索go然后安装
代理配置:https://goproxy.io/
配置代理:
环境变量:
GO111MODULE:on
GOPROXY:https://goproxy.io
创建goOne文件夹
创建hello.go文件
package main
import "fmt"
func main() {
fmt.Println("Helow world!")
}
文件夹内
go mod init goOne
go build hello.go
go run hello.go
229

被折叠的 条评论
为什么被折叠?



