/go-zero-gin-template

go-zero gin template for user

Primary LanguageGoGNU General Public License v3.0GPL-3.0

Table of Contents generated with DocToc

go-zero-gin-template

一个 go-zero gin web 模板

run

go mod tidy
cd api && go run api.go

test

[GIN-debug] GET    /v1/hello                 --> go-zero-gin-template/api/internal/handler.(*Handler).ReflectHandler.func1 (4 handlers)
{"@timestamp":"2022-06-08T15:45:16.871+08:00","caller":"api/api.go:73","content":"server is start at: 0.0.0.0:9097","level":"info"}
$ curl http://127.0.0.1:9097/v1/hello\?name\=ashing                  
{"errMsg":"","errCode":0,"data":"hello, ashing"}% 

docker

make docker-build-api version=v0.0.1
make docker-run-api version=v0.0.1