Binary implements formatStringInterpolator.Binary.
(arg ref.Val, locale string)
| 560 | |
| 561 | // Binary implements formatStringInterpolator.Binary. |
| 562 | func (c *stringFormatChecker) Binary(arg ref.Val, locale string) (string, error) { |
| 563 | id := c.args[c.currArgIndex].ID() |
| 564 | valid := c.verifyTypeOneOf(id, types.IntType, types.UintType, types.BoolType) |
| 565 | if !valid { |
| 566 | return "", binaryFormatError(id, c.typeOf(id).TypeName()) |
| 567 | } |
| 568 | return "", nil |
| 569 | } |
| 570 | |
| 571 | // Hex implements formatStringInterpolator.Hex. |
| 572 | func (c *stringFormatChecker) Hex(useUpper bool) func(ref.Val, string) (string, error) { |
nothing calls this directly
no test coverage detected