Skip to content

Commit

Permalink
upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
xinliangnote committed Dec 25, 2020
1 parent f8cfc2f commit 155f5fc
Show file tree
Hide file tree
Showing 1,027 changed files with 2,628 additions and 433,806 deletions.
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
.idea
/.vscode
.vscode
/.idea
.idea
mfmt
42 changes: 11 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
![](https://github.com/xinliangnote/Go/blob/master/03-go-gin-api%20%5B%E6%96%87%E6%A1%A3%5D/images/go-gin-api-logo.png)
```
██████╗ ██████╗ ██████╗ ██╗███╗ ██╗ █████╗ ██████╗ ██╗
██╔════╝ ██╔═══██╗ ██╔════╝ ██║████╗ ██║ ██╔══██╗██╔══██╗██║
██║ ███╗██║ ██║█████╗██║ ███╗██║██╔██╗ ██║█████╗███████║██████╔╝██║
██║ ██║██║ ██║╚════╝██║ ██║██║██║╚██╗██║╚════╝██╔══██║██╔═══╝ ██║
╚██████╔╝╚██████╔╝ ╚██████╔╝██║██║ ╚████║ ██║ ██║██║ ██║
╚═════╝ ╚═════╝ ╚═════╝ ╚═╝╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝
```

## go-gin-api

Expand Down Expand Up @@ -37,12 +44,6 @@
- [ ] gRPC
- [ ] ...

## Download

```
git clone https://github.com/xinliangnote/go-gin-api.git
```

## Quick start

#### Requirements
Expand All @@ -61,20 +62,12 @@ export GOPROXY=https://goproxy.io
cd go-gin-api
go run main.go
输出如下,表示 Http Server 启动成功。
|-----------------------------------|
| go-gin-api |
|-----------------------------------|
| Go Http Server Start Successful |
| Port:9999 Pid:xxxxx |
|-----------------------------------|
```

#### HTTP Demo

```
curl -X POST http://127.0.0.1:9999/product
curl -X POST http://127.0.0.1:9999/demo/user
```

#### Jaeger Demo
Expand Down Expand Up @@ -138,22 +131,9 @@ pprof -http=:9998 xxx.cpu.prof
http://127.0.0.1:9998/ui/
```

## Dependence

- WEB 框架:github.com/gin-gonic/gin
- 链路追踪:github.com/jaegertracing/jaeger-client-go
- 限流:golang.org/x/time/rate
- 工具包:github.com/xinliangnote/go-util

## Document
## Special Thanks

- [1. 使用 go modules 初始化项目](https://mp.weixin.qq.com/s/1XNTEgZ0XGZZdxFOfR5f_A)
- [2. 规划项目目录和参数验证](https://mp.weixin.qq.com/s/11AuXptWGmL5QfiJArNLnA)
- [3. 路由中间件 - 日志记录](https://mp.weixin.qq.com/s/eTygPXnrYM2xfrRQyfn8Tg)
- [4. 路由中间件 - 捕获异常](https://mp.weixin.qq.com/s/SconDXB_x7Gan6T0Awdh9A)
- [5. 路由中间件 - Jaeger 链路追踪(理论篇)](https://mp.weixin.qq.com/s/28UBEsLOAHDv530ePilKQA)
- [6. 路由中间件 - Jaeger 链路追踪(实战篇)](https://mp.weixin.qq.com/s/Ea28475_UTNaM9RNfgPqJA)
- [7. 路由中间件 - 签名验证](https://mp.weixin.qq.com/s/0cozELotcpX3Gd6WPJiBbQ)
[@koketama](https://github.com/koketama)

## Learning together

Expand Down
5 changes: 0 additions & 5 deletions app/controller/param_bind/product.go

This file was deleted.

13 changes: 0 additions & 13 deletions app/controller/param_verify/product.go

This file was deleted.

54 changes: 0 additions & 54 deletions app/controller/product/product.go

This file was deleted.

103 changes: 0 additions & 103 deletions app/route/middleware/logger/logger.go

This file was deleted.

62 changes: 0 additions & 62 deletions app/route/route.go

This file was deleted.

14 changes: 0 additions & 14 deletions app/util/bind/bind.go

This file was deleted.

Loading

0 comments on commit 155f5fc

Please sign in to comment.