MCPcopy
hub / github.com/etcd-io/bbolt / writelnBytes

Function writelnBytes

cmd/bbolt/command/utils.go:63–70  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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;
63func 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.
73func isPrintable(s string) bool {

Callers 4

pageItemPrintLeafItemKeyFunction · 0.85
keysFuncFunction · 0.85
getFuncFunction · 0.85

Calls 1

formatBytesFunction · 0.70

Tested by

no test coverage detected