From dcb932663dc7efbd97adc0d3e997eb723f988392 Mon Sep 17 00:00:00 2001 From: zhaomingqiang Date: Fri, 11 Feb 2022 12:07:48 +0800 Subject: [PATCH] fix: core.Context Value method --- README.md | 2 +- README.zh.md | 2 +- core/context.go | 5 +++-- core/version.go | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 6e3ae4b2..3c5318f0 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,7 @@ If you encounter any problems during usage, please let us know by submitting [G - The latest release candidate provides more [open services API](/service) and bug repair. ```shell -go get github.com/larksuite/oapi-sdk-go@v1.1.43 +go get github.com/larksuite/oapi-sdk-go@v1.1.44 ``` ## Explanation of terms diff --git a/README.zh.md b/README.zh.md index 50a7e2d6..b0d2dca8 100644 --- a/README.zh.md +++ b/README.zh.md @@ -30,7 +30,7 @@ --- ```shell -go get github.com/larksuite/oapi-sdk-go@v1.1.43 +go get github.com/larksuite/oapi-sdk-go@v1.1.44 ``` ## 术语解释 diff --git a/core/context.go b/core/context.go index 0ba26f6c..7d777dcd 100644 --- a/core/context.go +++ b/core/context.go @@ -81,8 +81,9 @@ func (c *Context) Err() error { func (c *Context) Value(key interface{}) interface{} { if keyAsString, ok := key.(string); ok { - val, _ := c.Get(keyAsString) - return val + if val, ok := c.Get(keyAsString); ok { + return val + } } return c.c.Value(key) } diff --git a/core/version.go b/core/version.go index be2dfed6..d62a02c8 100644 --- a/core/version.go +++ b/core/version.go @@ -1,3 +1,3 @@ package core -const SdkVersion = "v1.1.43" +const SdkVersion = "v1.1.44"