The packets.DecodeShortTopic function could use packets.EncodeUint16 internally and just convert the result to a string. However packets.EncodeUint16 is in header.go, which suggests it is intended to be used only in code dealing with packet headers. Maybe move it out of that file and consider it a more general function?
The
packets.DecodeShortTopic
function could usepackets.EncodeUint16
internally and just convert the result to a string. Howeverpackets.EncodeUint16
is inheader.go
, which suggests it is intended to be used only in code dealing with packet headers. Maybe move it out of that file and consider it a more general function?