Skip to content

Commit ad4c750

Browse files
committed
fix: keep blank lines around conditional batch insert
1 parent d1bf5e3 commit ad4c750

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

internal/template/method.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -308,12 +308,12 @@ func Test_{{.QueryStructName}}Query(t *testing.T) {
308308
t.Error("create item in table <{{.TableName}}> fail:", err)
309309
}
310310
311-
{{- if not .HasUniqueIndex }}
311+
{{ if not .HasUniqueIndex }}
312312
err = _do.CreateInBatches([]*{{.StructInfo.Package}}.{{.ModelStructName}}{ {}, {} }, 10)
313313
if err != nil {
314314
t.Error("create item in table <{{.TableName}}> fail:", err)
315315
}
316-
{{- end }}
316+
{{ end }}
317317
_, err = _do.Select({{.QueryStructName}}.ALL).Take()
318318
if err != nil {
319319
t.Error("Take() on table <{{.TableName}}> fail:", err)

0 commit comments

Comments
 (0)