package lib import "strings" // 过滤sql特殊字符 func ReplaceSQL(name string) string { name = strings.Replace(name, ";", "", -1) name = strings.Replace(name, ",", "", -1) name = strings.Replace(name, "?", "", -1) name = strings.Replace(name, "<", "", -1) name = strings.Replace(name, ">", "", -1) name = strings.Replace(name, "(", "", -1) name = strings.Replace(name, ")", "", -1) name = strings.Replace(name, "@", "", -1) name = strings.Replace(name, "=", "", -1) name = strings.Replace(name, "+", "", -1) name = strings.Replace(name, "*", "", -1) name = strings.Replace(name, "&", "", -1) name = strings.Replace(name, "#", "", -1) name = strings.Replace(name, "%", "", -1) name = strings.Replace(name, "$", "", -1) return name }