1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-21 06:09:42 +02:00

improved setup wizard redirection

This commit is contained in:
Harvey Kandola 2017-08-29 17:55:41 +01:00
parent 8081b60146
commit d3512b499a
15 changed files with 670 additions and 661 deletions

View file

@ -268,6 +268,7 @@ func getStatements(bytes []byte) []string {
stripped := regexp.MustCompile("(?s)--.*?\n|/\\*.*?\\*/").ReplaceAll(bytes, []byte("\n"))
sqls := strings.Split(string(stripped), ";")
ret := make([]string, 0, len(sqls))
for _, v := range sqls {
trimmed := strings.TrimSpace(v)
if len(trimmed) > 0 &&
@ -275,5 +276,6 @@ func getStatements(bytes []byte) []string {
ret = append(ret, trimmed+";")
}
}
return ret
}