I have a file which is a "template" in pure ASCII containing hex values represented like ex \x0d\0a
for CR\LF
.
A line in the file could look like this:
TEXT100\x1b\x03
I would like to convert this into a byte array ( so 0x1b
becomes 1 single byte - ASCII for ESC ) the simplest way in Go - is there any way this can be done without writing one that manually goes through each line from scratch?
Can the ASCII/templating module support or be adjusted to understand such a format?