printer

package
v1.9.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 30, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DumpByteSlice

func DumpByteSlice(b []byte, bytesPerRow int, showASCII, showPosHex, showPosDec bool, showOnlyBytes []int) (out string)

DumpByteSlice dump a byte slice in hex and optionally ASCII format. Optionally but position at the beginning of each row, like xxd. Optionally convert to ASCII at end of each row, like xxd. Can show positions at beginning of each row in hex, decimal or both. Can filter out all rows except those containing given positions in showOnlyBytes. If showOnlyBytes is nil, all rows are shown. If showOnlyBytes is not nil, even an empty slice, will only show those rows that contain the given positions.

func DumpByteSlicesWithDiffs

func DumpByteSlicesWithDiffs(a, b []byte, bytesPerRow int, showASCII, showPosHex, showPosDec bool) (different bool, out string)

DumpByteSlicesWithDiffs show two byte slices in hex and ASCII format, with differences highlighted.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL