mirror of
https://github.com/eolinker/apinto
synced 2025-10-05 08:47:04 +08:00
requestID使用UUID
This commit is contained in:
@@ -4,6 +4,8 @@ import (
|
||||
"encoding/json"
|
||||
"net/http"
|
||||
|
||||
"github.com/go-basic/uuid"
|
||||
|
||||
"github.com/valyala/fasthttp"
|
||||
|
||||
goku_plugin "github.com/eolinker/goku-standard-plugin"
|
||||
@@ -130,7 +132,7 @@ func (ctx *Context) RequestId() string {
|
||||
|
||||
//NewContext 创建Context
|
||||
func NewContext(requestCtx *fasthttp.RequestCtx) *Context {
|
||||
requestID := utils.GetRandomString(16)
|
||||
requestID := uuid.New()
|
||||
requestReader := NewRequestReader(requestCtx.Request)
|
||||
ctx := &Context{
|
||||
responseWriter: requestCtx,
|
||||
|
Reference in New Issue
Block a user