We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 00d6bbf commit e1cb773Copy full SHA for e1cb773
quote.go
@@ -14,17 +14,17 @@ func (q Quote) ID(name string) string {
14
if end > -1 {
15
name = name[:end]
16
}
17
- return `"` + strings.Replace(name, `"`, `""`, -1) + `"`
+ return `"` + strings.ReplaceAll(name, `"`, `""`) + `"`
18
19
20
func (q Quote) Value(v interface{}) string {
21
switch v := v.(type) {
22
default:
23
panic("unsupported value")
24
case string:
25
- v = strings.Replace(v, `'`, `''`, -1)
+ v = strings.ReplaceAll(v, `'`, `''`)
26
if strings.Contains(v, `\`) {
27
- v = strings.Replace(v, `\`, `\\`, -1)
+ v = strings.ReplaceAll(v, `\`, `\\`)
28
v = ` E'` + v + `'`
29
} else {
30
v = `'` + v + `'`
0 commit comments