# go-study **Repository Path**: fun-study/go-study ## Basic Information - **Project Name**: go-study - **Description**: golang学习工程 - **Primary Language**: Go - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2024-08-06 - **Last Updated**: 2026-02-05 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 环境变量 ```shell # GOROOT 类似于 Java 中的 JAVA_HOME go env GOROOT # 示例输出 D:/IDE/go/go1.25.6 go env GOPATH # 示例输出 C:\Users\89754\go GOPATH/ ├── pkg/ # 编译后的包(.a 文件) └── bin/ # 编译后的可执行文件 ``` # 打包 ```shell # linux、darwin、windows set GOOS=linux # arm、amd64、arm64 set GOARCH=arm64 go build -o xxx xxx.go ``` # 设置代理 ```shell # 设置代理地址 go env -w GOPROXY=https://goproxy.cn # 设置完后 重新执行即可go get # 添加或移除库 go mod tidy # 安装库 go get xxxxx ```