package util import ( "encoding/binary" ) func U32ToByte(u uint32) []byte { buf := make([]byte, 4) binary.BigEndian.PutUint32(buf, u) return buf }