Skip to content

Commit fa1a093

Browse files
committed
api: make UUID_extId private
Part of #158
1 parent e8d6feb commit fa1a093

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ Versioning](http://semver.org/spec/v2.0.0.html) except to the first release.
2828
- msgpack.v2 support (#236)
2929
- pool/RoundRobinStrategy (#158)
3030
- DeadlineIO (#158)
31+
- UUID_extId (#158)
3132

3233
### Fixed
3334

uuid/uuid.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import (
2222
)
2323

2424
// UUID external type.
25-
const UUID_extId = 2
25+
const uuid_extID = 2
2626

2727
func encodeUUID(e *msgpack.Encoder, v reflect.Value) error {
2828
id := v.Interface().(uuid.UUID)
@@ -63,12 +63,12 @@ func decodeUUID(d *msgpack.Decoder, v reflect.Value) error {
6363

6464
func init() {
6565
msgpack.Register(reflect.TypeOf((*uuid.UUID)(nil)).Elem(), encodeUUID, decodeUUID)
66-
msgpack.RegisterExtEncoder(UUID_extId, uuid.UUID{},
66+
msgpack.RegisterExtEncoder(uuid_extID, uuid.UUID{},
6767
func(e *msgpack.Encoder, v reflect.Value) ([]byte, error) {
6868
uuid := v.Interface().(uuid.UUID)
6969
return uuid.MarshalBinary()
7070
})
71-
msgpack.RegisterExtDecoder(UUID_extId, uuid.UUID{},
71+
msgpack.RegisterExtDecoder(uuid_extID, uuid.UUID{},
7272
func(d *msgpack.Decoder, v reflect.Value, extLen int) error {
7373
return decodeUUID(d, v)
7474
})

0 commit comments

Comments
 (0)