1
0
mirror of https://github.com/DATA-DOG/go-sqlmock.git synced 2025-01-24 03:16:17 +02:00
go-sqlmock/util.go

18 lines
258 B
Go

package sqlmock
import (
"regexp"
"strings"
)
var re *regexp.Regexp
func init() {
re = regexp.MustCompile("\\s+")
}
// strip out new lines and trim spaces
func stripQuery(q string) (s string) {
return strings.TrimSpace(re.ReplaceAllString(q, " "))
}