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

Method Octal

ext/formatting_v2.go:524–531  ·  view source on GitHub ↗

Octal implements formatStringInterpolatorV2.Octal.

(arg ref.Val)

Source from the content-addressed store, hash-verified

522
523// Octal implements formatStringInterpolatorV2.Octal.
524func (c *stringFormatCheckerV2) Octal(arg ref.Val) (string, error) {
525 id := c.args[c.currArgIndex].ID()
526 valid := c.verifyTypeOneOf(id, types.IntType, types.UintType)
527 if !valid {
528 return "", octalFormatErrorV2(id, c.typeOf(id).TypeName())
529 }
530 return "", nil
531}
532
533// Arg implements formatListArgs.Arg.
534func (c *stringFormatCheckerV2) Arg(index int64) (ref.Val, error) {

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected