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

Function bytesToOctets

parser/unparser.go:593–599  ·  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

591// bytesToOctets converts byte sequences to a string using a three digit octal encoded value
592// per byte.
593func bytesToOctets(byteVal []byte) string {
594 var b strings.Builder
595 for _, c := range byteVal {
596 fmt.Fprintf(&b, "\\%03o", c)
597 }
598 return b.String()
599}
600
601// writeOperatorWithWrapping outputs the operator and inserts a newline for operators configured
602// in the unparser options.

Callers 1

visitConstValMethod · 0.70

Calls 1

StringMethod · 0.65

Tested by

no test coverage detected