From 6e891029bf1128e0845ce64a111bd35f0682dcce Mon Sep 17 00:00:00 2001 From: Javier Fabrizio Date: Tue, 11 Jul 2023 15:56:45 -0300 Subject: [PATCH] add comments to functions --- context.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/context.go b/context.go index 9286d5d4..d22f4f27 100644 --- a/context.go +++ b/context.go @@ -1180,11 +1180,12 @@ func (c *Context) SetAccepted(formats ...string) { /***** GOLANG.ORG/X/NET/CONTEXT *****/ /************************************/ -// hasRequestContext returns whether c.Request has Context and fallback. +// hasFallback returns whether c.engine has ContextWithFallback. func (c *Context) hasFallback() bool { return c.engine != nil && c.engine.ContextWithFallback } +// hasRequestContext returns whether c.Request has Context func (c *Context) hasRequestContext() bool { return c.Request != nil && c.Request.Context() != nil }