Skip to content
Myr

render: update msgpack usage (#1498)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

please see msgpack usage: https://github.com/ugorji/go/tree/master/codec#usage

authored by 田欧 · committed by Bo-Yi Wu · parent 6073a79 · Browse files · 1 file+2 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+2 added−2 removed

  • other:+2 added−2 removed

1 file+2 added−2 removed

modified:render/msgpack.go+2 added-2 removed
24 unmodified lines
25}2627func WriteMsgPack(w http.ResponseWriter, obj interface{}) error {28 writeContentType(w, msgpackContentType)29 var h codec.Handle = new(codec.MsgpackHandle)30 return codec.NewEncoder(w, h).Encode(obj)29 var mh codec.MsgpackHandle30 return codec.NewEncoder(w, &mh).Encode(obj)31}