feat(context): add ContextWithFallback feature flag (#3166) (#3172)

Enable fallback Context.Deadline(), Context.Done(), Context.Err() and Context.Value()
This commit is contained in:
wei
2022-06-06 18:43:53 +08:00
committed by GitHub
parent 92ba8e17aa
commit f197a8bae0
3 changed files with 110 additions and 16 deletions
+3
View File
@@ -147,6 +147,9 @@ type Engine struct {
// UseH2C enable h2c support.
UseH2C bool
// ContextWithFallback enable fallback Context.Deadline(), Context.Done(), Context.Err() and Context.Value() when Context.Request.Context() is not nil.
ContextWithFallback bool
delims render.Delims
secureJSONPrefix string
HTMLRender render.HTMLRender