From 29c7b0a0d805838f45fe4b6b88df151a69e5ec4b Mon Sep 17 00:00:00 2001 From: Ariel Mashraki Date: Wed, 27 Nov 2019 23:12:24 -0800 Subject: [PATCH] dialect/sql: remove Go1.13 specific features Summary: Pull Request resolved: https://github.com/facebookincubator/ent/pull/205 Reviewed By: alexsn Differential Revision: D18742422 fbshipit-source-id: 1e1996fe26787788e4c0466a58884b4fa0581353 --- dialect/sql/builder.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dialect/sql/builder.go b/dialect/sql/builder.go index 0eda2bcb7..10fa8605e 100644 --- a/dialect/sql/builder.go +++ b/dialect/sql/builder.go @@ -1684,7 +1684,7 @@ func (b *Builder) Quote(ident string) string { // if it was quoted with the wrong // identifier character. if strings.Contains(ident, "`") { - return strings.ReplaceAll(ident, "`", `"`) + return strings.Replace(ident, "`", `"`, -1) } return strconv.Quote(ident) // an identifier for unknown dialect. @@ -1714,7 +1714,7 @@ func (b *Builder) Ident(s string) *Builder { case (isFunc(s) || isModifier(s)) && b.postgres(): // modifiers and aggregation functions that // were called without dialect information. - b.WriteString(strings.ReplaceAll(s, "`", `"`)) + b.WriteString(strings.Replace(s, "`", `"`, -1)) default: b.WriteString(s) }