fix: 修复配置字段描述换行的情况下导出的 Go 代码编译报错问题
This commit is contained in:
parent
0610928736
commit
e676982b9a
|
@ -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":
|
||||
|
|
Loading…
Reference in New Issue