Skip to content

Commit

Permalink
update: update custom serialization Packet.
Browse files Browse the repository at this point in the history
  • Loading branch information
zishang520 committed Jul 28, 2023
1 parent 505f775 commit 525b711
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions parser/type.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ package parser
type PacketType byte

type Packet struct {
Type PacketType
Nsp string
Data any
Id *uint64
Attachments *uint64
Type PacketType `json:"type" mapstructure:"type" msgpack:"type"`
Nsp string `json:"nsp" mapstructure:"nsp" msgpack:"nsp"`
Data any `json:"data,omitempty" mapstructure:"data,omitempty" msgpack:"data,omitempty"`
Id *uint64 `json:"id,omitempty" mapstructure:"id,omitempty" msgpack:"id,omitempty"`
Attachments *uint64 `json:"attachments,omitempty" mapstructure:"attachments,omitempty" msgpack:"attachments,omitempty"`
}

const (
Expand Down

0 comments on commit 525b711

Please sign in to comment.