(m map[string]any, key string)
| 244 | } |
| 245 | |
| 246 | func getFloat(m map[string]any, key string) float64 { |
| 247 | if v, ok := m[key]; ok { |
| 248 | switch n := v.(type) { |
| 249 | case float64: |
| 250 | return n |
| 251 | case json.Number: |
| 252 | f, _ := n.Float64() |
| 253 | return f |
| 254 | } |
| 255 | } |
| 256 | return 0 |
| 257 | } |
| 258 | |
| 259 | func getBool(m map[string]any, key string) bool { |
| 260 | if v, ok := m[key]; ok { |
no outgoing calls
no test coverage detected