1
0
mirror of https://github.com/DATA-DOG/go-sqlmock.git synced 2025-01-10 00:28:42 +02:00
go-sqlmock/util.go

14 lines
222 B
Go
Raw Normal View History

2014-02-07 09:58:27 +03:00
package sqlmock
import (
"regexp"
"strings"
)
var re = regexp.MustCompile("\\s+")
2014-02-07 09:58:27 +03:00
// strip out new lines and trim spaces
func stripQuery(q string) (s string) {
return strings.TrimSpace(re.ReplaceAllString(q, " "))
2014-02-07 09:58:27 +03:00
}