************************************/ ***** GOLANG.ORG/X/NET/CONTEXT *****/ ************************************/ hasRequestContext returns whether c.Request has Context and fallback.
()
| 1432 | |
| 1433 | // hasRequestContext returns whether c.Request has Context and fallback. |
| 1434 | func (c *Context) hasRequestContext() bool { |
| 1435 | hasFallback := c.engine != nil && c.engine.ContextWithFallback |
| 1436 | hasRequestContext := c.Request != nil && c.Request.Context() != nil |
| 1437 | return hasFallback && hasRequestContext |
| 1438 | } |
| 1439 | |
| 1440 | // Deadline returns that there is no deadline (ok==false) when c.Request has no Context. |
| 1441 | func (c *Context) Deadline() (deadline time.Time, ok bool) { |
no outgoing calls