Skip to content

Instantly share code, notes, and snippets.

View boudr's full-sized avatar

Brandon Boudreaux boudr

  • Summon
  • Michigan
View GitHub Profile
func Escape(sql string) string {
dest := make([]byte, 0, 2*len(sql))
var escape byte
for i := 0; i < len(sql); i++ {
c := sql[i]
escape = 0
switch c {
case 0: /* Must be escaped for 'mysql' */