redis client 增加 单测 && bug fix

This commit is contained in:
2021-02-27 22:48:20 +08:00
parent 3411acc73d
commit 017e4bc540
3 changed files with 53 additions and 21 deletions

View File

@@ -71,7 +71,7 @@ func NewContext(flag string, of ...SetContextFunc) *Context {
// requestID 填充
if len(ctx.RequestID) == 0 {
// 先从 gin 读
if nil != ctx.Ctx {
if nil != ctx.GinCtx {
ctx.RequestID = ctx.GinCtx.GetString(ctx.RequestIDField)
}
// 再从extra读取