# GoLearnCode **Repository Path**: superziyear/go-learn-code ## Basic Information - **Project Name**: GoLearnCode - **Description**: go语言学习 - **Primary Language**: Go - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2022-01-09 - **Last Updated**: 2023-11-17 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # GoLearnCode #### 介绍 go语言学习 #### 安装Go 下载地址:https://dl.google.com/go/go1.17.7.windows-amd64.msi 傻瓜安装即可 配置环境变量 ```shell script GOROOT=GO安装路径 eg:GOROOT=C:\Program Files\Go GOPATH=Go语言工作目录 eg:GOROOT=D:\GoCode ``` #### 安装GoLand 最新版本好像没有试用了,所以我们使用2020版本 下载地址:https://download.jetbrains.com.cn/go/goland-2020.1.4.exe 傻瓜安装即可 File->Settings中点击Plugins->找到小齿轮->Manage Plugin Repositories 添加一个仓库 地址:https://plugins.zhile.io 之后在商店搜索插件 IDE Eval Reset 安装即可 配置GOROOT和GOPATH #### 安装的库 ```shell script go get github.com/go-basic/uuid ``` #### 可能遇到的问题 配置 GOROOT 遇到 The selected directory is not a valid home for Go SDK 解决办法 进入到GO安装目录,找到\src\runtime\internal\sys\zversion.go 在文件最后追加 版本改成你使用go的版本 ```shell script const TheVersion = `go1.17.7` ``` 重启GOLAND重新配置即可 go get 命令网络超时问题 解决办法: ```shell script go env -w GOPROXY=https://goproxy.cn,direct ```