Commit ea858b8a7bf83999a16faf8b4709e73c0e7e6a9f

Authored by Marko Tikvić
1 parent 4b4ea384f8
Exists in master and in 1 other branch v2

refactoring

1   -package restutility
  1 +package webutility
2 2  
3 3 import (
4 4 "errors"
... ...
format_utility.go
1   -package restutility
  1 +package webutility
2 2  
3 3 import (
4 4 "time"
... ...
1   -package restutility
  1 +package webutility
2 2  
3 3 import (
4 4 "net/http"
... ...
1   -package restutility
  1 +package webutility
2 2  
3 3 import (
4 4 "net/http"
... ...
1   -package restutility
  1 +package webutility
2 2  
3 3 import (
4 4 "gopkg.in/rana/ora.v3"
... ...
1   -package restutility
  1 +package webutility
2 2  
3 3 import (
4 4 "gopkg.in/rana/ora.v3"
... ...
1   -package restutility
  1 +package webutility
2 2  
3 3 import (
4 4 "strings"
5 5 )
6 6  
7   -func SQLSafeString(in string) string {
8   - patern := "\"';&*<>=\\`:"
  7 +var patern string = "\"';&*<>=\\`:"
  8 +
  9 +func SQLSafeString(s string) string {
9 10 for _, c := range patern {
10   - in = strings.Replace(in, string(c), "", -1)
  11 + s = strings.Replace(s, string(c), "", -1)
11 12 }
12   - return in
  13 + return s
13 14 }
... ...