From eecc9c2a50eecfe2f4f2df5372efcf6f357845ef Mon Sep 17 00:00:00 2001 From: holgerhuang Date: Mon, 14 Oct 2024 20:11:36 +0800 Subject: [PATCH] fixed Value do not respect the context.WithValue contract --- context.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/context.go b/context.go index 1f356515..8f5284ca 100644 --- a/context.go +++ b/context.go @@ -44,9 +44,7 @@ const BodyBytesKey = "_gin-gonic/gin/bodybyteskey" // ContextKey is the key that a Context returns itself for. const ContextKey = "_gin-gonic/gin/contextkey" -type ContextKeyType int - -const ContextRequestKey ContextKeyType = 0 +const ContextRequestKey = "_gin-gonic/gin/contextrequestkey" // abortIndex represents a typical value used in abort functions. const abortIndex int8 = math.MaxInt8 >> 1