Merge remote-tracking branch 'upstream/master'

This commit is contained in:
thinkerou 2021-06-25 13:20:15 +08:00
commit 34344e5ea4
2 changed files with 3 additions and 1 deletions

View File

@ -13,6 +13,8 @@ import (
"github.com/ugorji/go/codec"
)
// Check interface implemented here to support go build tag nomsgpack.
// See: https://github.com/gin-gonic/gin/pull/1852/
var (
_ Render = MsgPack{}
)

View File

@ -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"))
}