Binary implements formatStringInterpolatorV2.Binary.
(arg ref.Val)
| 500 | |
| 501 | // Binary implements formatStringInterpolatorV2.Binary. |
| 502 | func (c *stringFormatCheckerV2) Binary(arg ref.Val) (string, error) { |
| 503 | id := c.args[c.currArgIndex].ID() |
| 504 | valid := c.verifyTypeOneOf(id, types.BoolType, types.IntType, types.UintType) |
| 505 | if !valid { |
| 506 | return "", binaryFormatErrorV2(id, c.typeOf(id).TypeName()) |
| 507 | } |
| 508 | return "", nil |
| 509 | } |
| 510 | |
| 511 | // Hex implements formatStringInterpolatorV2.Hex. |
| 512 | func (c *stringFormatCheckerV2) Hex(useUpper bool) func(ref.Val) (string, error) { |
nothing calls this directly
no test coverage detected