added empty query checks

This commit is contained in:
ston1th 2017-11-12 15:37:16 +01:00
commit 0e2b25e788
3 changed files with 31 additions and 5 deletions

View file

@ -21,6 +21,19 @@ func checkFields(s []string, val string) error {
return nil
}
func clearFields(s string) []string {
a := strings.Split(s, " ")
b := make([]string, len(a))
c := 0
for _, v := range a {
if v != "" {
b[c] = v
c++
}
}
return b[:c]
}
type less func(i, j int) bool
func reverse(f less) less {