mirror of
https://github.com/gin-gonic/gin.git
synced 2025-10-17 05:42:09 +08:00
S1030: should use buf.String() instead of string(buf.Bytes())
This commit is contained in:
parent
20ca4380e8
commit
6c13ebb09b
@ -39,6 +39,6 @@ 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"))
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user