1
0
mirror of https://github.com/Mrs4s/MiraiGo.git synced 2025-05-04 19:17:38 +08:00
wdvxdr 723563415f
client: refactor decoder
(cherry picked from commit 3e201bd4491838bda026130eb2b93d58ef70db69)
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)
}