Function
QuickSetBool
(bval *bool, m map[string]any, name string)
Source from the content-addressed store, hash-verified
| 83 | } |
| 84 | |
| 85 | func QuickSetBool(bval *bool, m map[string]any, name string) { |
| 86 | v, ok := m[name] |
| 87 | if !ok { |
| 88 | return |
| 89 | } |
| 90 | sqlInt, ok := v.(int64) |
| 91 | if ok { |
| 92 | if sqlInt > 0 { |
| 93 | *bval = true |
| 94 | } |
| 95 | return |
| 96 | } |
| 97 | sqlBool, ok := v.(bool) |
| 98 | if ok { |
| 99 | *bval = sqlBool |
| 100 | } |
| 101 | } |
| 102 | |
| 103 | func QuickSetBytes(bval *[]byte, m map[string]any, name string) { |
| 104 | v, ok := m[name] |
Tested by
no test coverage detected