mirror of
https://github.com/rancher/steve.git
synced 2025-09-01 07:27:46 +00:00
[v0.4] Move lasso SQL cache in Steve (#473)
* Copy pkg/cache/sql from lasso to pkg/sqlcache * Rename import from github.com/rancher/lasso/pkg/cache/sql to github.com/rancher/steve/pkg/sqlcache * go mod tidy * Fix lint errors * Remove lasso SQL cache mentions * Fix more CI lint errors * fix goimports Signed-off-by: Silvio Moioli <silvio@moioli.net> * Fix imports * Fix more linting errors --------- Signed-off-by: Silvio Moioli <silvio@moioli.net> Co-authored-by: Silvio Moioli <silvio@moioli.net>
This commit is contained in:
8
pkg/sqlcache/db/utility.go
Normal file
8
pkg/sqlcache/db/utility.go
Normal file
@@ -0,0 +1,8 @@
|
||||
package db
|
||||
|
||||
import "strings"
|
||||
|
||||
// Sanitize returns a string that can be used in SQL as a name
|
||||
func Sanitize(s string) string {
|
||||
return strings.ReplaceAll(s, "\"", "")
|
||||
}
|
Reference in New Issue
Block a user