Function
QuickSetStr
(strVal *string, m map[string]any, name string)
Source from the content-addressed store, hash-verified
| 12 | ) |
| 13 | |
| 14 | func QuickSetStr(strVal *string, m map[string]any, name string) { |
| 15 | v, ok := m[name] |
| 16 | if !ok { |
| 17 | return |
| 18 | } |
| 19 | ival, ok := v.(int64) |
| 20 | if ok { |
| 21 | *strVal = strconv.FormatInt(ival, 10) |
| 22 | return |
| 23 | } |
| 24 | str, ok := v.(string) |
| 25 | if !ok { |
| 26 | return |
| 27 | } |
| 28 | *strVal = str |
| 29 | } |
| 30 | |
| 31 | func QuickSetInt(ival *int, m map[string]any, name string) { |
| 32 | v, ok := m[name] |
Tested by
no test coverage detected