Scientific implements formatStringInterpolator.Scientific.
(precision *int)
| 548 | |
| 549 | // Scientific implements formatStringInterpolator.Scientific. |
| 550 | func (c *stringFormatChecker) Scientific(precision *int) func(ref.Val, string) (string, error) { |
| 551 | return func(arg ref.Val, locale string) (string, error) { |
| 552 | id := c.args[c.currArgIndex].ID() |
| 553 | valid := c.verifyTypeOneOf(id, types.DoubleType, types.StringType) |
| 554 | if !valid { |
| 555 | return "", scientificFormatError(id, c.typeOf(id).TypeName()) |
| 556 | } |
| 557 | return "", nil |
| 558 | } |
| 559 | } |
| 560 | |
| 561 | // Binary implements formatStringInterpolator.Binary. |
| 562 | func (c *stringFormatChecker) Binary(arg ref.Val, locale string) (string, error) { |
nothing calls this directly
no test coverage detected