Open
Description
It is recommended to adjust the Packer interface to improve scalability and flexibility:
for Message
in Packer
, use interface{} type instead of []byte for data
field.
In different business scenarios, if you want to use some specific libraries for use such as pdu
for smpp
, the structure used by a specific library cannot be adjusted to []byte, unless an additional Marshal and Unmarshal. When using interface{} to replace []byte, it can save a time consumption of Marshal and Unmarshal.