1
0
mirror of https://github.com/netsampler/goflow2.git synced 2024-05-06 15:54:52 +00:00
2021-05-25 17:33:26 -07:00

17 lines
257 B
Go

package utils
import (
"encoding/binary"
"io"
)
func BinaryDecoder(payload io.Reader, dests ...interface{}) error {
for _, dest := range dests {
err := binary.Read(payload, binary.BigEndian, dest)
if err != nil {
return err
}
}
return nil
}