]> Cypherpunks repositories - gostls13.git/commit
net/textproto: prevent test from failing with nil pointer dereference
authorMarat Khabibullin <marat.khabibullin@jetbrains.com>
Wed, 13 Feb 2019 19:19:33 +0000 (19:19 +0000)
committerDaniel Martí <mvdan@mvdan.cc>
Tue, 26 Feb 2019 18:40:29 +0000 (18:40 +0000)
commitc6e47069af1a4e93547450e34253da2b22b9c23d
tree638e4cefea0dda129d2cba94b1bbfeb3acf40946
parent8d72e59853de42cb50a5aa172cedcc9010345184
net/textproto: prevent test from failing with nil pointer dereference

The variable err could have nil value when we call err.Error(),
because after we check it for nil above we continue the test
(t.Errorf doesn't stop the test execution).

Updates #30208

Change-Id: Ibcf38698326c69c06068989510311e37806995c6
GitHub-Last-Rev: 3ab20f6d7fe34ed9b777e0894b57166d173de8ca
GitHub-Pull-Request: golang/go#30214
Reviewed-on: https://go-review.googlesource.com/c/162457
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/net/textproto/reader_test.go