1.安装golang
https://golang.org/dl/](https://golang.org/dl/
2.配置环境
GOROOT,GOPATH=“E:/go/work/”
3.下载相关的环境
git clone https://github.com/name5566/leafserver
go get github.com/name5566/leaf 或者 git clone https://github.com/name5566/leaf E:/go/work/src/github.com/name5566/leaf
go get github.com/golang/protobuf/proto 或者 git clone https://github.com/golang/protobuf E:/go/work/src/github.com/golang/protobuf
go get gopkg.in/mgo.v2 或者 git clone https://gopkg.in/mgo.v2 E:/go/work/src/gopkg.in/mgo.v2
go get github.com/gorilla/websocket 或者 git clone https://github.com/gorilla/websocket E:/go/work/src/github.com/gorilla/websocket
4.编译安装
go install server
备注,编译过程中出现问题,e.g:
image.png
直接去下载对应的库即可
5.运行
image.png
网友评论