download from this url:https://golang.org/dl/
go version
ll /usr/local/go
vim ~/.bash_profile
export GOROOT=/usr/local/go
export GOPATH=/Users/blank/Documents/docker/go
export PATH=$PATH:$GOROOT/bin:$GOPATH/bin
source ~/.bash_profile
go get github.com/astaxie/beego go get github.com/beego/bee
______
| ___ \
| |_/ / ___ ___
| ___ \ / _ \ / _ \
| |_/ /| __/| __/
\____/ \___| \___| v1.10.0
├── Beego : 1.11.1
├── GoVersion : go1.11.4
├── GOOS : darwin
├── GOARCH : amd64
├── NumCPU : 4
├── GOPATH : /Users/blank/Documents/docker/go
├── GOROOT : /usr/local/go
├── Compiler : gc
└── Date : Thursday, 20 Dec 2018
mkdir /Users/blank/Documents/docker/go/apps touch test.go
package main
import "fmt"
func main(){
fmt.Printf("hello world")
}
go run test.go
bee new projectName
cd /Users/blank/Documents/docker/go/src/demo
bee run
bee api projectName
cd /Users/blank/Documents/docker/go/src/demo
//the cmd will open the swagger api doc
bee run -downdoc=true -gendoc=true