rpc protocol update

This commit is contained in:
Gordon
2021-12-08 18:15:14 +08:00
parent 0e99fb27b5
commit c6ade8d9bc
5 changed files with 10 additions and 16 deletions
+3 -3
View File
@@ -115,12 +115,12 @@ func JsonStringToMap(str string) (tempMap map[string]interface{}) {
_ = json.Unmarshal([]byte(str), &tempMap)
return tempMap
}
func GetSwitchFromOptions(Options map[string]interface{}, key string) (result bool) {
if flag, ok := Options[key]; !ok || flag.(float64) == 1 {
func GetSwitchFromOptions(Options map[string]int32, key string) (result bool) {
if flag, ok := Options[key]; !ok || flag == 1 {
return true
}
return false
}
func SetSwitchFromOptions(Options map[string]interface{}, key string, value interface{}) {
func SetSwitchFromOptions(Options map[string]int32, key string, value int32) {
Options[key] = value
}