Simplify code (#2004)
- Use buf.String instead of converison - Remove redundant return
This commit is contained in:
committed by
thinkerou
parent
502c898d75
commit
461df9320a
@ -45,7 +45,7 @@ func TestRenderMsgPack(t *testing.T) {
|
||||
err = codec.NewEncoder(buf, h).Encode(data)
|
||||
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, w.Body.String(), string(buf.Bytes()))
|
||||
assert.Equal(t, w.Body.String(), buf.String())
|
||||
assert.Equal(t, "application/msgpack; charset=utf-8", w.Header().Get("Content-Type"))
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user