forked from TarsCloud/TarsGo
-
Notifications
You must be signed in to change notification settings - Fork 4
Home
Zhou Hao edited this page Jul 27, 2019
·
16 revisions
- 去掉代码中
github.com/TarsCloud/TarsGo/
的绝对路径,使内网版本taf和开源版本更统一; - 合并内网版本变动,
ParsePackage()
支持自定义协议; - 支持go mod,具体请参考
新建工程方法
一节初始化;
# 配置GOPATH
$ export GOPATH=$HOME/go
$ export PATH=$GOPATH/bin:$PATH
# 获取tars源码 (提供 create_tars_server.sh 和 makefile.tars 模板)
$ mkdir -p $GOPATH/src/github.com/tars-go
$ cd $GOPATH/src/github.com/tars-go
$ git clone https://github.com/tars-go/tars.git
# 在非GOPATH目录下,创建Demo程序
$ $GOPATH/src/github.com/tars-go/tars/tools/create_tars_server.sh
<Usage: sh /go/src/github.com/tars-go/tars/tools/create_tars_server.sh App Server Servant>
>>>>>> sh /go/src/github.com/tars-go/tars/tools/create_tars_server.sh TeleSafe PhonenumSogouServer SogouInfo
$ $GOPATH/src/github.com/tars-go/tars/tools/create_tars_server.sh DemoGroup DemoProject DemoServant
# 编译并运行例子代码
$ cd DemoGroup/DemoProject/
$ make
# 打包 (用于页面部署)
$ make tar