This website works better with JavaScript.
Home
Explore
Help
Sign In
yigitcolakoglu
/
mconnect
Watch
1
Star
0
Fork
0
Code
Issues
0
Pull Requests
0
Projects
0
Releases
3
Wiki
Activity
Browse Source
protocol/packet: json field names, settable body
Signed-off-by: Maciek Borzecki <maciek.borzecki@gmail.com>
bboozzoo/golang
Maciek Borzecki
7 years ago
parent
a38a88406d
commit
19f3aea2dd
1 changed files
with
11 additions
and
3 deletions
Unified View
Diff Options
Show Stats
Download Patch File
Download Diff File
+11
-3
protocol/packet/packet.go
+ 11
- 3
protocol/packet/packet.go
View File
@ -16,7 +16,15 @@ import (
)
)
type
Packet
struct
{
type
Packet
struct
{
Id
uint64
Type
string
Body
json
.
RawMessage
Id
uint64
`
json:"id"
`
Type
string
`
json:"type"
`
Body
json
.
RawMessage
`
json:"body"
`
auxBody
interface
{
}
}
func
New
(
typ
string
,
body
interface
{
}
)
*
Packet
{
return
&
Packet
{
Type
:
typ
,
auxBody
:
body
,
}
}
}
Write
Preview
Loading…
Cancel
Save