MAC下GO 安装环境配置
下载并安装GO安装包
打开http://golang.org 下载对应的二进制安装包
配置工作环境
mkdir -p ~/Documents/go
#把以下内容加入/etc/profile 中
export GOROOT=/usr/local/go
export GOPATH=/Users/用户名/Documents/go
export GOBIN=$GOPATH/bin
export PATH="$PATH:$GOROOT/bin:$GOPATH/bin"
#保存内容并执行以下更新环境信息
srouce /etc/profile
安装常用工具
官方
go get -u golang.org/x/tools/cmd/...
go get -u golang.org/x/tools/cmd/godoc
go get -u github.com/golang/dep/cmd/dep
mkdir -p $GOPATH/src/golang.org/x
cd $GOPATH/src/golang.org/x
git clone https://github.com/golang/tools.git
git clone https://github.com/golang/sys.git
git clone https://github.com/golang/crypto.git
git clone https://github.com/golang/net.git
git clone https://github.com/golang/text.git
第三方
go get -u github.com/Masterminds/glide
go install github.com/Masterminds/glide
go get -u github.com/BurntSushi/toml
go get -u gopkg.in/yaml.v2
go get -u github.com/valyala/fasthttp
go get -u github.com/valyala/tcplisten
go get -u github.com/buaazp/fasthttprouter
go get -u github.com/ccpaging/nxlog4go
go get -u github.com/go-xorm/xorm
go get -u github.com/go-sql-driver/mysql
go get -u github.com/golang-plus/uuid
go get -u github.com/json-iterator/go
go get -u github.com/olivere/elastic
go get -u github.com/oschwald/geoip2-golang
go get -u github.com/pkg/errors
go get -u github.com/robfig/cron
go get -u github.com/seefan/gossdb
go get -u github.com/go-redis/redis
go get -u github.com/tinylib/msgp
go get -u github.com/PuerkitoBio/goquery
go get -u github.com/robertkrimen/otto
go get -u github.com/henrylee2cn/surfer
go get github.com/yanyiwu/gojieba
go get -u github.com/huichen/sego
go get -u github.com/gorilla/mux
go get -u github.com/urfave/cli
go get -u gopkg.in/cheggaaa/pb.v2
go get -u github.com/smallnest/goreq
go get -u github.com/EDDYCJY/fake-useragent
Copyright © 2015 Powered by MWeb, Theme used GitHub CSS.