plugins: msgpack codec should use cty tags

This commit is contained in:
Michael Schurter
2018-10-15 20:03:05 -07:00
parent b12de40124
commit 2b249eee14

View File

@@ -52,7 +52,9 @@ func (p *PluginBase) GRPCClient(ctx context.Context, broker *plugin.GRPCBroker,
// MsgpackHandle is a shared handle for encoding/decoding of structs
var MsgpackHandle = func() *codec.MsgpackHandle {
h := &codec.MsgpackHandle{RawToString: true}
h := &codec.MsgpackHandle{}
h.RawToString = true
h.TypeInfos = codec.NewTypeInfos([]string{"cty", "codec"})
h.MapType = reflect.TypeOf(map[string]interface{}(nil))
return h
}()