Decimal implements formatStringInterpolator.Decimal.
(arg ref.Val, locale string)
| 525 | |
| 526 | // Decimal implements formatStringInterpolator.Decimal. |
| 527 | func (c *stringFormatChecker) Decimal(arg ref.Val, locale string) (string, error) { |
| 528 | id := c.args[c.currArgIndex].ID() |
| 529 | valid := c.verifyTypeOneOf(id, types.IntType, types.UintType) |
| 530 | if !valid { |
| 531 | return "", decimalFormatError(id, c.typeOf(id).TypeName()) |
| 532 | } |
| 533 | return "", nil |
| 534 | } |
| 535 | |
| 536 | // Fixed implements formatStringInterpolator.Fixed. |
| 537 | func (c *stringFormatChecker) Fixed(precision *int) func(ref.Val, string) (string, error) { |
nothing calls this directly
no test coverage detected