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

Method String

ext/formatting.go:517–524  ·  view source on GitHub ↗

String implements formatStringInterpolator.String.

(arg ref.Val, locale string)

Source from the content-addressed store, hash-verified

515
516// String implements formatStringInterpolator.String.
517func (c *stringFormatChecker) String(arg ref.Val, locale string) (string, error) {
518 formatArg := c.args[c.currArgIndex]
519 valid, badID := c.verifyString(formatArg)
520 if !valid {
521 return "", stringFormatError(badID, c.typeOf(badID).TypeName())
522 }
523 return "", nil
524}
525
526// Decimal implements formatStringInterpolator.Decimal.
527func (c *stringFormatChecker) Decimal(arg ref.Val, locale string) (string, error) {

Callers

nothing calls this directly

Calls 4

verifyStringMethod · 0.95
typeOfMethod · 0.95
stringFormatErrorFunction · 0.85
TypeNameMethod · 0.65

Tested by

no test coverage detected