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

Function bytesToOctets

parser/unparser.go:531–537  ·  view source on GitHub ↗

bytesToOctets converts byte sequences to a string using a three digit octal encoded value per byte.

(byteVal []byte)

Source from the content-addressed store, hash-verified

529// bytesToOctets converts byte sequences to a string using a three digit octal encoded value
530// per byte.
531func bytesToOctets(byteVal []byte) string {
532 var b strings.Builder
533 for _, c := range byteVal {
534 fmt.Fprintf(&b, "\\%03o", c)
535 }
536 return b.String()
537}
538
539// writeOperatorWithWrapping outputs the operator and inserts a newline for operators configured
540// in the unparser options.

Callers 1

visitConstValMethod · 0.70

Calls 1

StringMethod · 0.65

Tested by

no test coverage detected