options add value

This commit is contained in:
Gordon
2022-05-18 11:49:24 +08:00
parent 424f854145
commit 3433d211a5
2 changed files with 4 additions and 2 deletions
+3
View File
@@ -116,6 +116,9 @@ func JsonStringToMap(str string) (tempMap map[string]int32) {
return tempMap
}
func GetSwitchFromOptions(Options map[string]bool, key string) (result bool) {
if Options == nil {
return true
}
if flag, ok := Options[key]; !ok || flag {
return true
}