sqlboiler/vendor/gopkg.in/DATA-DOG/go-sqlmock.v1/util.go

14 lines
222 B
Go
Raw Normal View History

2016-08-30 08:24:25 +02:00
package sqlmock
import (
"regexp"
"strings"
)
var re = regexp.MustCompile("\\s+")
// strip out new lines and trim spaces
func stripQuery(q string) (s string) {
return strings.TrimSpace(re.ReplaceAllString(q, " "))
}