- 使用 sqlx 处理数据库,使用 echo 做 mvc
- 格式化输出 json ,处理 nil 值。 统一数据返回格式
curl http://127.0.0.1{
"code": 200,
"data": null,
"message": "service run",
"success": true
}yum install go -y
vi /etc/profile
export GOPATH=/root/go
export PATH=$PATH:$GOPATH/bin
:wq
source /etc/profile
cd /root/go && mkdir src
cd ./src
git clone https://github.com/bestK/hello.git
cd hello
go get
go build
nohup ./hello &