From e8d19587f39ceb4169b62cbc6886d9c4fcd1a34e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E8=8C=B6=E6=B8=85=E6=AC=A2?= Date: Sun, 14 Apr 2024 21:38:53 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=A8=A1=E6=9D=BF=E6=A0=BC?= =?UTF-8?q?=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sql2go/parser.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/sql2go/parser.go b/sql2go/parser.go index 5593be2..44ce40c 100644 --- a/sql2go/parser.go +++ b/sql2go/parser.go @@ -179,15 +179,15 @@ func generateTableColumnDefined(modelStructName string, columnList []*sqlparser. structFieldCommentInstanceResult += "}" tableColumnFunction := ` - // Columns 获取表字段定义 - func ({TABLE_FIRST} {MODEL_STRUCT_NAME}) Columns() *{COLUMN_DEFINED} { - return {STRUCT_FIELD_DESC_DEFINED_RESULT} - } +// Columns 获取表字段定义 +func ({TABLE_FIRST} {MODEL_STRUCT_NAME}) Columns() *{COLUMN_DEFINED} { + return {STRUCT_FIELD_DESC_DEFINED_RESULT} +} - // ColumnComment 获取表字段描述 - func ({TABLE_FIRST} {MODEL_STRUCT_NAME}) ColumnComment() map[string]string { - return {STRUCT_FIELD_COMMENT_DEFINED_RESULT} - } +// ColumnComment 获取表字段描述 +func ({TABLE_FIRST} {MODEL_STRUCT_NAME}) ColumnComment() map[string]string { + return {STRUCT_FIELD_COMMENT_DEFINED_RESULT} +} ` dataMap := map[string]string{ "{COLUMN_DEFINED}": columnDefineName,