Skip to content

Commit

Permalink
render: update msgpack usage (#1498)
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkerou authored and appleboy committed Aug 19, 2018
1 parent 6073a79 commit 32b58e0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions render/msgpack.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ func (r MsgPack) Render(w http.ResponseWriter) error {

func WriteMsgPack(w http.ResponseWriter, obj interface{}) error {
writeContentType(w, msgpackContentType)
var h codec.Handle = new(codec.MsgpackHandle)
return codec.NewEncoder(w, h).Encode(obj)
var mh codec.MsgpackHandle
return codec.NewEncoder(w, &mh).Encode(obj)
}

0 comments on commit 32b58e0

Please sign in to comment.