Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // DontEscape is a sentinel value for characters that don't need to be escaped. DontEscape = byte(255) // EncodeMap specifies how to escape binary data with '\'. EncodeMap [256]byte // HexMap is a mapping from each byte to the `\x%%` hex form as a []byte. HexMap [256][]byte // RawHexMap is a mapping from each byte to the `%%` hex form as a []byte. RawHexMap [256][]byte )
Functions ¶
func EncodeEscapedChar ¶
func EncodeEscapedChar( buf *bytes.Buffer, entireString string, currentRune rune, currentByte byte, currentIdx int, quoteChar byte, )
EncodeEscapedChar is used internally to write out a character from a larger string that needs to be escaped to a buffer.
func NeedEscape ¶
NeedEscape returns whether the given byte needs to be escaped.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.