(v any)
| 154 | } |
| 155 | |
| 156 | func toInt(v any) (int, bool) { |
| 157 | switch t := v.(type) { |
| 158 | case float64: |
| 159 | return int(t), true |
| 160 | case int: |
| 161 | return t, true |
| 162 | case int64: |
| 163 | return int(t), true |
| 164 | default: |
| 165 | return 0, false |
| 166 | } |
| 167 | } |
| 168 | |
| 169 | func toFloat(v any) (float64, bool) { |
| 170 | switch t := v.(type) { |
no outgoing calls
no test coverage detected