Skip to content

Latest commit

 

History

History
49 lines (32 loc) · 1 KB

tarsgo.md

File metadata and controls

49 lines (32 loc) · 1 KB

TarsGo Development Environment Setup

Content

Environment Dependence

Require Go 1.13.x or above,see https://golang.org/doc/install

Installation

Install go (for example go install path: /usr/local/go), and configure GOROOT, GOPATH. For example, in Linux:

export GOROOT=/usr/local/go
export GOPATH=/root/gocode
export PATH=$PATH:$GOROOT/bin:$GOPATH/bin

If you are in China, you can set up go proxy:

go env -w GOPROXY=https://goproxy.cn   

Set Go Modules to auto:

go env -w GO111MODULE=auto

Enter GOPATH and get TarsGo

cd $GOPATH
go get -u github.com/TarsCloud/TarsGo/tars

And TarsGo is downloaded to path: $GOPATH/src/github.com/TarsCloud/TarsGo/.

If you cannot find source code of TarsGo in this path, please check the above steps.

After TarsGo is downloaded, install tars2go:

go install $GOPATH/src/github.com/TarsCloud/TarsGo/tars/tools/tars2go