Decimal implements formatStringInterpolatorV2.Decimal.
(arg ref.Val)
| 466 | |
| 467 | // Decimal implements formatStringInterpolatorV2.Decimal. |
| 468 | func (c *stringFormatCheckerV2) Decimal(arg ref.Val) (string, error) { |
| 469 | id := c.args[c.currArgIndex].ID() |
| 470 | valid := c.verifyTypeOneOf(id, types.IntType, types.UintType, types.DoubleType) |
| 471 | if !valid { |
| 472 | return "", decimalFormatErrorV2(id, c.typeOf(id).TypeName()) |
| 473 | } |
| 474 | return "", nil |
| 475 | } |
| 476 | |
| 477 | // Fixed implements formatStringInterpolatorV2.Fixed. |
| 478 | func (c *stringFormatCheckerV2) Fixed(precision int) func(ref.Val) (string, error) { |
nothing calls this directly
no test coverage detected