Commit ea858b8a7bf83999a16faf8b4709e73c0e7e6a9f
1 parent
4b4ea384f8
Exists in
master
and in
1 other branch
refactoring
Showing
7 changed files
with
12 additions
and
11 deletions
Show diff stats
auth_utility.go
format_utility.go
http_utility.go
json_utility.go
list_config.go
select_config.go
sql_sequrity.go
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 | } | ... | ... |