Go struct转[]byte
Go struct转[]byte使用unsafe实现
使用unsafe实现
type MsgLogon struct {
SenderCompID [20]byte
TargetCompID [20]byte
HeartBtInt int32
Password [16]byte
DefaultApplVerID [32]byte
}
func StructToBytes(iter interface{}, len int) []byte {
var
原创
2021-02-19 14:43:01 ·
2111 阅读 ·
0 评论