Numeric creates a numeric value from a string.
(str string)
| 350 | // return float64(val) |
| 351 | default: |
| 352 | return val |
| 353 | } |
| 354 | } |
| 355 | |
| 356 | // Numeric creates a numeric value from a string. |
| 357 | func Numeric(str string) pgtype.Numeric { |
| 358 | numeric := pgtype.Numeric{} |
| 359 | if err := numeric.Scan(str); err != nil { |
| 360 | panic(err) |
| 361 | } |
no outgoing calls
no test coverage detected