Example #1
0
func createmessage() []byte {
	ProtoMessage := new(msgproto.Msg)
	ProtoMessage.Id = proto.Int32(12344)
	ProtoMessage.Lat = proto.Int64(12344)
	ProtoMessage.Long = proto.Int64(12344)
	ProtoMessage.Utime = proto.Int64(int64(time.Now().Unix()))
	data, err := proto.Marshal(ProtoMessage)
	if err != nil {
		fmt.Println(err)
	}
	return data

}