1
0
mirror of https://github.com/Mrs4s/MiraiGo.git synced 2025-07-01 20:23:26 +00:00
Files
MiraiGo/client/internal/network/packet.go
wdvxdr 723563415f client: refactor decoder
(cherry picked from commit 3e201bd449)
2021-12-27 15:36:38 +08:00

26 lines
336 B
Go

package network
type RequestParams map[string]interface{}
func (p RequestParams) Bool(k string) bool {
if p == nil {
return false
}
i, ok := p[k]
if !ok {
return false
}
return i.(bool)
}
func (p RequestParams) Int32(k string) int32 {
if p == nil {
return 0
}
i, ok := p[k]
if !ok {
return 0
}
return i.(int32)
}