From 15d15d1038f359cdd3a795a472e02ab4cc550f58 Mon Sep 17 00:00:00 2001 From: Georgy Torquemada Date: Tue, 23 Jan 2024 15:57:02 +0000 Subject: [PATCH] hot-fix(templates/structure): fix to angry line eating for fields with ignored tags In https://github.com/volatiletech/sqlboiler/commit/f27b374e8757d175a537912fd35935cb431794e8#diff-ad4a99e7b5707e0720670302be779e2d230f9a6d9d2a84ac2011f6ffe9367633R14 was added left pad deletion, which perform creating line record without breaking space, if tagIgnore was used. It break formatting of created code, and sqlboiler failes to perform saving --- templates/main/00_struct.go.tpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/main/00_struct.go.tpl b/templates/main/00_struct.go.tpl index 5320430f..f2d2ff1e 100644 --- a/templates/main/00_struct.go.tpl +++ b/templates/main/00_struct.go.tpl @@ -7,11 +7,11 @@ type {{$alias.UpSingular}} struct { {{- $colAlias := $alias.Column $column.Name -}} {{- $orig_col_name := $column.Name -}} {{- range $column.Comment | splitLines -}} // {{ . }} - {{end -}} + {{ end -}} {{if ignore $orig_tbl_name $orig_col_name $.TagIgnore -}} {{$colAlias}} {{$column.Type}} `{{generateIgnoreTags $.Tags}}boil:"{{$column.Name}}" json:"-" toml:"-" yaml:"-"` - {{- else -}} + {{ else -}} {{- /* render column alias and column type */ -}} {{ $colAlias }} {{ $column.Type -}}