From b2ff96b2e278e3e6359a8d2eae64e30dfd49f6e9 Mon Sep 17 00:00:00 2001 From: demoManito <1430482733@qq.com> Date: Fri, 20 Oct 2023 20:54:41 +0800 Subject: [PATCH] fix --- clause/set.go | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/clause/set.go b/clause/set.go index 5c281d96..b23ccaec 100644 --- a/clause/set.go +++ b/clause/set.go @@ -19,20 +19,15 @@ func (set Set) Build(builder Builder) { if len(set) > 0 { for idx, assignment := range set { if idx > 0 { - builder.WriteByte(',') - builder.WriteByte(' ') + builder.WriteString(", ") } builder.WriteQuoted(assignment.Column) - builder.WriteByte(' ') - builder.WriteByte('=') - builder.WriteByte(' ') + builder.WriteString(" = ") builder.AddVar(builder, assignment.Value) } } else { builder.WriteQuoted(Column{Name: PrimaryKey}) - builder.WriteByte(' ') - builder.WriteByte('=') - builder.WriteByte(' ') + builder.WriteString(" = ") builder.WriteQuoted(Column{Name: PrimaryKey}) } }