1
0
mirror of https://github.com/DATA-DOG/go-sqlmock.git synced 2025-06-23 00:17:47 +02:00

add doc blocks, split files

This commit is contained in:
gedi
2014-02-07 08:58:27 +02:00
parent 2fc5a0dd15
commit ee2ed8f2d5
8 changed files with 160 additions and 131 deletions

11
util.go Normal file
View File

@ -0,0 +1,11 @@
package sqlmock
import "strings"
// strip out new lines and trim spaces
func stripQuery(q string) (s string) {
s = strings.Replace(q, "\n", " ", -1)
s = strings.Replace(s, "\r", "", -1)
s = strings.TrimSpace(s)
return
}