Help us shape the future of Go! Take the 2026 Go Developer Survey

util

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2026 License: Apache-2.0, Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UnescapeChar

func UnescapeChar(b byte) []byte

UnescapeChar returns the unescaped byte(s) for a MySQL backslash escape sequence. Given the byte after the backslash, it returns the replacement byte(s). For most escapes this is a single byte; for \% and \_ both the backslash and the character are preserved.

See https://dev.mysql.com/doc/refman/8.0/en/string-literals.html

\" \' \\ \n \0 \b \Z \r \t ==> escape to one char
\% \_ ==> preserve both chars
other ==> remove backslash

Types

This section is empty.

Jump to

Keyboard shortcuts

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