linting: a few fixes

This commit is contained in:
Zach Ramsay
2017-10-23 08:30:18 -04:00
parent 8e031b367f
commit 47d3fa4741
4 changed files with 17 additions and 22 deletions

View File

@ -73,8 +73,8 @@ func TestEncodeDemo(t *testing.T) {
// Try to encode as binary
b, err := data.ToWire(tc.in)
if assert.Nil(err, "%d: %#v", i, tc.in) {
err := data.FromWire(b, tc.out)
if assert.Nil(err) {
err2 := data.FromWire(b, tc.out)
if assert.Nil(err2) {
assert.Equal(tc.expected, tc.out.String())
}
}
@ -82,8 +82,8 @@ func TestEncodeDemo(t *testing.T) {
// Try to encode it as json
j, err := data.ToJSON(tc.in)
if assert.Nil(err, "%d: %#v", i, tc.in) {
err := data.FromJSON(j, tc.out)
if assert.Nil(err) {
err2 := data.FromJSON(j, tc.out)
if assert.Nil(err2) {
assert.Equal(tc.expected, tc.out.String())
}
}