Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix errcheck issue for extension observer #11462

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix errcheck issue for extension observer
Signed-off-by: Ziqi Zhao <[email protected]>
  • Loading branch information
fatsheep9146 committed Jun 23, 2022
commit 88e8e80e005741ee72fa942f7938e92fdc90a8e2
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.

// nolint:errcheck
package errctx

import (
Expand All @@ -25,7 +24,7 @@ import (
func TestWithValue(t *testing.T) {
assert.Nil(t, WithValue(nil, "a", "b"))
assert.Panics(t, func() {
WithValue(fmt.Errorf("base"), "", nil)
_ = WithValue(fmt.Errorf("base"), "", nil)
})

e1 := WithValue(fmt.Errorf("base"), "a", "b")
Expand All @@ -49,7 +48,7 @@ func TestWithValue(t *testing.T) {
func TestWithValues(t *testing.T) {
assert.Nil(t, WithValues(nil, map[string]interface{}{"a": "b"}))
assert.Panics(t, func() {
WithValues(fmt.Errorf("base"), map[string]interface{}{"": "123"})
_ = WithValues(fmt.Errorf("base"), map[string]interface{}{"": "123"})
})

e1 := WithValues(fmt.Errorf("base"), map[string]interface{}{"a": "b", "c": 123})
Expand Down