v0.0.214 reassign innerctx

This commit is contained in:
Julian Graf 2023-07-27 09:58:10 +02:00
parent f0c5b36ea9
commit 3b30bb049e
2 changed files with 4 additions and 4 deletions

View File

@ -15,7 +15,7 @@ type AppContext struct {
func CreateAppContext(g *gin.Context, innerCtx context.Context, cancelFn context.CancelFunc) *AppContext { func CreateAppContext(g *gin.Context, innerCtx context.Context, cancelFn context.CancelFunc) *AppContext {
for key, value := range g.Keys { for key, value := range g.Keys {
context.WithValue(innerCtx, key, value) innerCtx = context.WithValue(innerCtx, key, value)
} }
return &AppContext{ return &AppContext{
inner: innerCtx, inner: innerCtx,
@ -42,7 +42,7 @@ func (ac *AppContext) Value(key any) any {
} }
func (ac *AppContext) Set(key, value any) { func (ac *AppContext) Set(key, value any) {
context.WithValue(ac.inner, key, value) ac.inner = context.WithValue(ac.inner, key, value)
} }
func (ac *AppContext) Cancel() { func (ac *AppContext) Cancel() {

View File

@ -1,5 +1,5 @@
package goext package goext
const GoextVersion = "0.0.213" const GoextVersion = "0.0.214"
const GoextVersionTimestamp = "2023-07-27T09:46:06+0200" const GoextVersionTimestamp = "2023-07-27T09:58:10+0200"