Fixed implements formatStringInterpolatorV2.Fixed.
(precision int)
| 476 | |
| 477 | // Fixed implements formatStringInterpolatorV2.Fixed. |
| 478 | func (c *stringFormatCheckerV2) Fixed(precision int) func(ref.Val) (string, error) { |
| 479 | return func(arg ref.Val) (string, error) { |
| 480 | id := c.args[c.currArgIndex].ID() |
| 481 | valid := c.verifyTypeOneOf(id, types.IntType, types.UintType, types.DoubleType) |
| 482 | if !valid { |
| 483 | return "", fixedPointFormatErrorV2(id, c.typeOf(id).TypeName()) |
| 484 | } |
| 485 | return "", nil |
| 486 | } |
| 487 | } |
| 488 | |
| 489 | // Scientific implements formatStringInterpolatorV2.Scientific. |
| 490 | func (c *stringFormatCheckerV2) Scientific(precision int) func(ref.Val) (string, error) { |
nothing calls this directly
no test coverage detected