func readBytesUntilUnescDelim(buf *bytes.Buffer, delim byte) ([]byte, error) {
	result := []byte{}
	for {
		b, err := buf.ReadByte()
		if err != nil {
			return result, err
		}
		if b == 92 {  
			b, err = buf.ReadByte()
			if err != nil {
				return result, err
			}
			result = append(result, b)
		} else if b == delim {
			return result, nil
		} else {
			result = append(result, b)
		}
	}
}
This file contains misc. details related to parsing the formatting
parameters, etc.
like bytes.ReadBytes, except it goes until the target byte is found not
preceded by a \, and eliminates the backslashes out of the result.

This is basically the simplest possible correct form of backslash
escaping. If it seems like overkill, bear in mind it is very simple and
easy to understand, and a lot of the "corrections" that leap to people's
minds are actually very complicated to implement *correctly*.

In particular, we throw away a backslash if it is the last character,
just so we don't end up with a corner case where a single backslash
survives.

This does not return the delimiter.
package strinterp
import (
	"bytes"
	"io"
)