writelnBytes writes the byte to the writer. Supported formats: ascii-encoded, hex, bytes, auto, redacted. Terminates the write with a new line symbol;
(w io.Writer, b []byte, format string)
| 61 | // writelnBytes writes the byte to the writer. Supported formats: ascii-encoded, hex, bytes, auto, redacted. |
| 62 | // Terminates the write with a new line symbol; |
| 63 | func writelnBytes(w io.Writer, b []byte, format string) error { |
| 64 | str, err := formatBytes(b, format) |
| 65 | if err != nil { |
| 66 | return err |
| 67 | } |
| 68 | _, err = fmt.Fprintln(w, str) |
| 69 | return err |
| 70 | } |
| 71 | |
| 72 | // isPrintable returns true if the string is valid unicode and contains only printable runes. |
| 73 | func isPrintable(s string) bool { |
no test coverage detected