Skip to content

Commit

Permalink
(refactor): Remove tags that will no longer be used in Struct.
Browse files Browse the repository at this point in the history
  • Loading branch information
zishang520 committed Jul 27, 2024
1 parent d4e7a7b commit 44360b9
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions packet/type.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,18 @@ type (
Type string

Options struct {
Compress bool `json:"compress" mapstructure:"compress" msgpack:"compress"`
WsPreEncoded types.BufferInterface `json:"wsPreEncoded,omitempty" mapstructure:"wsPreEncoded,omitempty" msgpack:"wsPreEncoded,omitempty"`
WsPreEncodedFrame types.BufferInterface `json:"wsPreEncodedFrame,omitempty" mapstructure:"wsPreEncodedFrame,omitempty" msgpack:"wsPreEncodedFrame,omitempty"`
Compress bool `json:"compress" msgpack:"compress"`
// Deprecated: this method will be removed in the next major release, please use [Options.WsPreEncodedFrame] instead.
WsPreEncoded types.BufferInterface
WsPreEncodedFrame types.BufferInterface `json:"wsPreEncodedFrame,omitempty" msgpack:"wsPreEncodedFrame,omitempty"`
}

Packet struct {
Type Type `json:"type" mapstructure:"type" msgpack:"type"`
Data io.Reader `json:"data,omitempty" mapstructure:"data,omitempty" msgpack:"data,omitempty"`
Options *Options `json:"options,omitempty" mapstructure:"options,omitempty" msgpack:"options,omitempty"`
Type Type `json:"type" msgpack:"type"`
Data io.Reader `json:"data,omitempty" msgpack:"data,omitempty"`
Options *Options `json:"options,omitempty" msgpack:"options,omitempty"`

// Deprecated: this method will be removed in the next major release, please use [Options.WsPreEncoded] instead.
// Deprecated: this method will be removed in the next major release, please use [Options.WsPreEncodedFrame] instead.
WsPreEncoded types.BufferInterface
}
)
Expand Down

0 comments on commit 44360b9

Please sign in to comment.