MCPcopy Create free account
hub / github.com/astercloud/aster / GetBoolParam

Function GetBoolParam

pkg/tools/builtin/utils.go:47–54  ·  view source on GitHub ↗

GetBoolParam 获取布尔参数的通用函数

(input map[string]any, key string, defaultValue bool)

Source from the content-addressed store, hash-verified

45
46// GetBoolParam 获取布尔参数的通用函数
47func GetBoolParam(input map[string]any, key string, defaultValue bool) bool {
48 if value, exists := input[key]; exists {
49 if b, ok := value.(bool); ok {
50 return b
51 }
52 }
53 return defaultValue
54}
55
56// GetStringSliceParam 获取字符串数组参数的通用函数
57func GetStringSliceParam(input map[string]any, key string) []string {

Callers 7

parseQuestionsMethod · 0.85
ExecuteMethod · 0.85
runTaskMethod · 0.85
ExecuteMethod · 0.85
ExecuteMethod · 0.85
ExecuteMethod · 0.85
ExecuteMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected