Function
QuickSetInt
(ival *int, m map[string]any, name string)
Source from the content-addressed store, hash-verified
| 29 | } |
| 30 | |
| 31 | func QuickSetInt(ival *int, m map[string]any, name string) { |
| 32 | v, ok := m[name] |
| 33 | if !ok { |
| 34 | return |
| 35 | } |
| 36 | sqlInt, ok := v.(int) |
| 37 | if ok { |
| 38 | *ival = sqlInt |
| 39 | return |
| 40 | } |
| 41 | sqlInt64, ok := v.(int64) |
| 42 | if ok { |
| 43 | *ival = int(sqlInt64) |
| 44 | return |
| 45 | } |
| 46 | } |
| 47 | |
| 48 | func QuickSetNullableInt64(ival **int64, m map[string]any, name string) { |
| 49 | v, ok := m[name] |
Tested by
no test coverage detected