@@ -25,7 +25,6 @@ import (
25
25
26
26
"github.com/gorhill/cronexpr"
27
27
"github.com/hashicorp/go-msgpack/codec"
28
- hcodec "github.com/hashicorp/go-msgpack/codec"
29
28
"github.com/hashicorp/go-multierror"
30
29
"github.com/hashicorp/go-version"
31
30
"github.com/mitchellh/copystructure"
@@ -9562,6 +9561,9 @@ var MsgpackHandle = func() *codec.MsgpackHandle {
9562
9561
// nil interface{}.
9563
9562
h .MapType = reflect .TypeOf (map [string ]interface {}(nil ))
9564
9563
9564
+ // only review struct codec tags
9565
+ h .TypeInfos = codec .NewTypeInfos ([]string {"codec" })
9566
+
9565
9567
return h
9566
9568
}()
9567
9569
@@ -9577,23 +9579,6 @@ var (
9577
9579
}
9578
9580
)
9579
9581
9580
- // TODO Figure out if we can remove this. This is our fork that is just way
9581
- // behind. I feel like its original purpose was to pin at a stable version but
9582
- // now we can accomplish this with vendoring.
9583
- var HashiMsgpackHandle = func () * hcodec.MsgpackHandle {
9584
- h := & hcodec.MsgpackHandle {}
9585
- h .RawToString = true
9586
-
9587
- // maintain binary format from time prior to upgrading latest ugorji
9588
- h .BasicHandle .TimeNotBuiltin = true
9589
-
9590
- // Sets the default type for decoding a map into a nil interface{}.
9591
- // This is necessary in particular because we store the driver configs as a
9592
- // nil interface{}.
9593
- h .MapType = reflect .TypeOf (map [string ]interface {}(nil ))
9594
- return h
9595
- }()
9596
-
9597
9582
// Decode is used to decode a MsgPack encoded object
9598
9583
func Decode (buf []byte , out interface {}) error {
9599
9584
return codec .NewDecoder (bytes .NewReader (buf ), MsgpackHandle ).Decode (out )
0 commit comments