https://github.com/cloud-org/go-zero-gin-template
go-zero gin template for user
https://github.com/cloud-org/go-zero-gin-template
api gin go go-zero
Last synced: 2 months ago
JSON representation
go-zero gin template for user
- Host: GitHub
- URL: https://github.com/cloud-org/go-zero-gin-template
- Owner: cloud-org
- License: gpl-3.0
- Created: 2022-06-08T03:33:38.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2022-06-08T07:52:56.000Z (about 4 years ago)
- Last Synced: 2025-03-08T15:49:59.039Z (over 1 year ago)
- Topics: api, gin, go, go-zero
- Language: Go
- Homepage:
- Size: 61.5 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
**Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)*
- [go-zero-gin-template](#go-zero-gin-template)
- [run](#run)
- [test](#test)
- [docker](#docker)
### go-zero-gin-template
一个 go-zero gin web 模板
#### run
```sh
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
```sh
make docker-build-api version=v0.0.1
```
```sh
make docker-run-api version=v0.0.1
```