Skip to content

Commit 7ac7e71

Browse files
committed
msgpack: sort type and function
1 parent 4ef2b52 commit 7ac7e71

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

msgpack/unpack.go

+7-7
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,13 @@ func (t Type) String() string {
5757
// ErrDataSizeTooLarge is the data size too large error.
5858
var 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.
6168
type 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.
8989
func (d *Decoder) SetExtensions(extensions ExtensionMap) {

0 commit comments

Comments
 (0)