Scientific implements formatStringInterpolatorV2.Scientific.
(precision int)
| 488 | |
| 489 | // Scientific implements formatStringInterpolatorV2.Scientific. |
| 490 | func (c *stringFormatCheckerV2) Scientific(precision int) func(ref.Val) (string, error) { |
| 491 | return func(arg ref.Val) (string, error) { |
| 492 | id := c.args[c.currArgIndex].ID() |
| 493 | valid := c.verifyTypeOneOf(id, types.IntType, types.UintType, types.DoubleType) |
| 494 | if !valid { |
| 495 | return "", scientificFormatErrorV2(id, c.typeOf(id).TypeName()) |
| 496 | } |
| 497 | return "", nil |
| 498 | } |
| 499 | } |
| 500 | |
| 501 | // Binary implements formatStringInterpolatorV2.Binary. |
| 502 | func (c *stringFormatCheckerV2) Binary(arg ref.Val) (string, error) { |
nothing calls this directly
no test coverage detected