File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -57,6 +57,13 @@ func (t Type) String() string {
5757// ErrDataSizeTooLarge is the data size too large error.
5858var ErrDataSizeTooLarge = errors .New ("msgpack: data size too large" )
5959
60+ // ExtensionMap specifies functions for converting MessagePack extensions to Go
61+ // values.
62+ //
63+ // The key is the MessagePack extension type.
64+ // The value is a function that converts the extension data to a Go value.
65+ type ExtensionMap map [int ]func ([]byte ) (interface {}, error )
66+
6067// Decoder reads MessagePack objects from an io.Reader.
6168type Decoder struct {
6269 extensions ExtensionMap
@@ -77,13 +84,6 @@ func NewDecoder(r io.Reader) *Decoder {
7784 }
7885}
7986
80- // ExtensionMap specifies functions for converting MessagePack extensions to Go
81- // values.
82- //
83- // The key is the MessagePack extension type.
84- // The value is a function that converts the extension data to a Go value.
85- type ExtensionMap map [int ]func ([]byte ) (interface {}, error )
86-
8787// SetExtensions specifies functions for converting MessagePack extensions to Go
8888// values.
8989func (d * Decoder ) SetExtensions (extensions ExtensionMap ) {
You can’t perform that action at this time.
0 commit comments