Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewEncoder ¶
func NewEncoder(w io.Writer) io.WriteCloser
NewEncoder returns an encoder object wrapping the given io.Writer. An encoder writes hex-editor-style lines to the wrapped io.Writer. For each 16-byte chunk of data written to the Encoder, a single line will be written to the output. Each line consists of the hexadecimal adress of the first byte on the line, followed byte space-separated, hex-encoded byte pairs, followed by the string representation of the bytes with non-printable characters replaced by '.'.
For example: writing the string 'totally\tradical!' to the Encoder will result in the following being written to the underlying io.Writer:
00000000: 746f 7461 6c6c 7909 7261 6469 6361 6c21 totally.radical!
The caller must Close the encoder to flush any partially written blocks.
Types ¶
This section is empty.