bytesToOctets converts byte sequences to a string using a three digit octal encoded value per byte.
(byteVal []byte)
| 591 | // bytesToOctets converts byte sequences to a string using a three digit octal encoded value |
| 592 | // per byte. |
| 593 | func 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. |