Skip to content

Conversation

@wingyplus
Copy link

Tests can cause nil pointer dereference if response is nil because it
uses t.Error that's just report an error to test output. Fixes by
using t.Fatal to stop immediately when the res is nil

Tests can cause nil pointer dereference if response is `nil` because it
uses `t.Error` that's just report an error to test output. Fixes by
using `t.Fatal` to stop immediately when the `res` is `nil`
@CLAassistant
Copy link

CLAassistant commented Nov 18, 2021

CLA assistant check
All committers have signed the CLA.

Copy link
Member

@kkdai kkdai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kkdai kkdai merged commit f57aa3a into line:master Nov 18, 2021
@wingyplus wingyplus deleted the fix-staticcheck branch November 19, 2021 00:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants