1
0
mirror of https://github.com/DATA-DOG/go-sqlmock.git synced 2024-11-28 08:49:01 +02:00
go-sqlmock/util.go
Ahmad Muzakki 1fd67a1762 - apply stripQuery before assigning query expectation
- remove unused function
2017-02-04 18:09:50 +07:00

14 lines
222 B
Go

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, " "))
}