修复恢复码请求取消并完成最终迁移补充验收
This commit is contained in:
1 parent
7349cd5b91
commit
662201a613
13 files changed
+587
-10
No files matched your search
@@ -0,0 +1,14 @@
|
||||
package controllers
|
||||
|
||||
import (
|
||||
"context"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// recoveryRequestContext 保留请求的取消信号;兼容无 HTTP 请求的内部调用。
|
||||
func recoveryRequestContext(req *http.Request) context.Context {
|
||||
if req == nil {
|
||||
return context.Background()
|
||||
}
|
||||
return req.Context()
|
||||
}
|
||||
Reference in new issue
Block a user