marshaling complex messages error
Created by: babaev
Tests don`t cover the case when marshaling messages with repeating groups which have embedded structs and tags with multiple values.
Example:
m := &marketdatarequest.Message{}
m.SetMDReqID(myPrefix)
m.SetSubscriptionRequestType(Type)
m.SetMarketDepth(1)
m.SetMDUpdateType(0)
m.SetNoMDEntryTypes([]marketdatarequest.NoMDEntryTypes{
marketdatarequest.NoMDEntryTypes{enum.MDEntryType_BID},
marketdatarequest.NoMDEntryTypes{enum.MDEntryType_OFFER},
})
nRelatedSym := marketdatarequest.NoRelatedSym{}
nRelatedSym.Symbol = &sPair
m.SetNoRelatedSym([]marketdatarequest.NoRelatedSym{
nRelatedSym,
})
message := m.Marshal()
This code will cause panic