MCPcopy Create free account
hub / github.com/cel-expr/cel-go / Binary

Method Binary

ext/formatting_v2.go:502–509  ·  view source on GitHub ↗

Binary implements formatStringInterpolatorV2.Binary.

(arg ref.Val)

Source from the content-addressed store, hash-verified

500
501// Binary implements formatStringInterpolatorV2.Binary.
502func (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.
512func (c *stringFormatCheckerV2) Hex(useUpper bool) func(ref.Val) (string, error) {

Callers

nothing calls this directly

Calls 5

verifyTypeOneOfMethod · 0.95
typeOfMethod · 0.95
binaryFormatErrorV2Function · 0.85
IDMethod · 0.65
TypeNameMethod · 0.65

Tested by

no test coverage detected