# golang **Repository Path**: ms_think/golang ## Basic Information - **Project Name**: golang - **Description**: No description available - **Primary Language**: Go - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2017-10-17 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README #GoLang 资料 自备梯子 --- ##1. 官网 > * https://github.com/golang/go > * https://golang.org (官网) > * http://zh-golang.appspot.com (中文官网) > * http://go-tour-zh.appspot.com (Go 中文使用指南) ##2. 安装及配置 ###2.1 下载 [[go1.9.1.windows-amd64.zip](https://golang.org)] ![输入图片说明](https://gitee.com/uploads/images/2017/1017/095337_381afe53_372486.png "2.1.png") ###2.2 解压 go1.9.1.windows-amd64.zip 并添加到环境变量中 linux: ``` export GOROOT=$HOME/golang export PATH=$PATH:$GOROOT/bin ``` windows: ``` 新建环境变量 GOROOT GOROOT=D:\Program Files\golang PATH=%GOROOT%\bin ``` ![输入图片说明](https://gitee.com/uploads/images/2017/1017/095643_7a84579c_372486.png "2.2.png") ###2.3 测试你的安装 通过构建一个简单的程序来检查Go的安装是否正确,具体操作如下: 首先创建一个名为 hello.go 的文件,并将以下代码保存在其中: ``` package main import "fmt" func main() { fmt.Printf("hello, world\n") } ``` 接着通过 go 工具运行它: ``` go run hello.go hello, world ``` 若你看到了“hello, world”信息,那么你的Go已被正确安装。 https://www.zybuluo.com/mdeditor#917007