一、GO windows安装
1、点击下载GO:https://golang.google.cn/
![](https://static.studygolang.com/191108/4cbfbd9659839281f0ddb175570b9292.png)
2、GO环境配置
![](https://static.studygolang.com/191108/192f0077bc092cf8555aae6434b34eef.png)
![](https://static.studygolang.com/191108/2b19daf2b70db5298a9fbc498de5464a.png)
3、看看demo
采用GoLand编辑器
![](https://static.studygolang.com/191108/7d420c5384ca1525f7a62fb1c06bce8d.png)
![](https://static.studygolang.com/191108/b69f6842f4068f5fbc7b5bfa17457457.png)
二、gin框架安装
go get -u github.com/gin-gonic/gin
(时间有点长,需要等待半个小时左右)
![](https://static.studygolang.com/191108/31bf566c55158e715e8e3e0b2d8cd516.png)
出现如下错误(缺什么就直接 go get github.com/xxx/xxx),执行:go get -u github.com/go-playground/locales(耗时也比较长,请耐心等待半小时)
![](https://static.studygolang.com/191108/774a7cc054d38f2fb358112d396434ff.png)
GoLand编译发生如下错误:
![](https://static.studygolang.com/191108/c77ce9831a7128efc75fb7541ff6d037.png)
执行:go get gopkg.in/yaml.v2(等待时间大概10分钟)
![](https://static.studygolang.com/191108/ec49a76506844d999843c33aeaebd5c8.png)
编译又发现如下错误
![](https://static.studygolang.com/191108/f07d60c88eb01a78ef40de9e5373ce3e.png)
分别执行(时间2分钟)
go get github.com/leodido/go-urn
go get github.com/mattn/go-isatty
![](https://static.studygolang.com/191108/7d1fb3a8c47806fe5f1c4cda968f29f0.png)
点击获取官方demo:https://github.com/gin-gonic/examples/blob/master/basic/main.go
编译,运行,大功告成,完美运行,perfect:
![](https://static.studygolang.com/191108/72e1030949039a5e8386b3dcabea3f61.png)
有疑问加站长微信联系(非本文作者)
![](https://static.golangjob.cn/static/img/footer.png?imageView2/2/w/280)