From e676982b9a0fb1f3b64af31e08cb90d6d355fd3b Mon Sep 17 00:00:00 2001 From: kercylan98 Date: Fri, 7 Jul 2023 17:27:18 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=E6=8F=8F=E8=BF=B0=E6=8D=A2=E8=A1=8C=E7=9A=84?= =?UTF-8?q?=E6=83=85=E5=86=B5=E4=B8=8B=E5=AF=BC=E5=87=BA=E7=9A=84=20Go=20?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E7=BC=96=E8=AF=91=E6=8A=A5=E9=94=99=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- planner/configexport/internal/config.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/planner/configexport/internal/config.go b/planner/configexport/internal/config.go index 2fb432f..218b42c 100644 --- a/planner/configexport/internal/config.go +++ b/planner/configexport/internal/config.go @@ -157,7 +157,10 @@ func (slf *Config) initField(sheet *xlsx.Sheet) error { } var field = NewField(slf.Name, fieldName, fieldType) - field.Describe = describe + field.Describe = strings.ReplaceAll(describe, "\n", ", ") + if strings.HasSuffix(field.Describe, ", ") { + field.Describe = field.Describe[:len(field.Describe)-2] + } field.ExportParam = exportParam switch field.ExportParam { case "s", "sc", "cs":