Closed atlantageek closed 5 years ago
Can you be more specific and provide an example?
I would like to be able to define something like this.
type connectIdl struct {
IndicatorID uint32
InitiatorPort uint16
Capabilities uint32
KeepAliveInterval uint32
VendorID string struc:"remaining"
}
If the object being unpacked is 20 bytes long the VendorID would take up the last 6 bytes of the 20 byte object.
Unpack uses an io.reader. There’s no such thing as the rest of the data.
Point taken. Thanks
I would like to request a new tag. Some protocols I work with want the user to take the remaining portion of a struct and assign it to the last string. Would it be possible to add that as a feature.