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

Method Octal

ext/formatting.go:584–591  ·  view source on GitHub ↗

Octal implements formatStringInterpolator.Octal.

(arg ref.Val, locale string)

Source from the content-addressed store, hash-verified

582
583// Octal implements formatStringInterpolator.Octal.
584func (c *stringFormatChecker) Octal(arg ref.Val, locale string) (string, error) {
585 id := c.args[c.currArgIndex].ID()
586 valid := c.verifyTypeOneOf(id, types.IntType, types.UintType)
587 if !valid {
588 return "", octalFormatError(id, c.typeOf(id).TypeName())
589 }
590 return "", nil
591}
592
593// Arg implements formatListArgs.Arg.
594func (c *stringFormatChecker) Arg(index int64) (ref.Val, error) {

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected