Skip to content

Commit 7785f07

Browse files
l2dyedsiper
authored andcommitted
output: fix deprecation warning
SetExt is deprecated, use SetBytesExt or SetInterfaceExt on the Handle instead. Signed-off-by: Zero King <[email protected]>
1 parent 3fd1e04 commit 7785f07

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

output/decoder.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,11 @@ package output
2020
import (
2121
"C"
2222
"encoding/binary"
23-
"github.com/ugorji/go/codec"
2423
"reflect"
2524
"time"
2625
"unsafe"
26+
27+
"github.com/ugorji/go/codec"
2728
)
2829

2930
type FLBDecoder struct {
@@ -59,7 +60,7 @@ func NewDecoder(data unsafe.Pointer, length int) *FLBDecoder {
5960

6061
dec := new(FLBDecoder)
6162
dec.handle = new(codec.MsgpackHandle)
62-
dec.handle.SetExt(reflect.TypeOf(FLBTime{}), 0, &FLBTime{})
63+
dec.handle.SetBytesExt(reflect.TypeOf(FLBTime{}), 0, &FLBTime{})
6364

6465
b = C.GoBytes(data, C.int(length))
6566
dec.mpdec = codec.NewDecoderBytes(b, dec.handle)

0 commit comments

Comments
 (0)