strings trim

This commit is contained in:
daheige 2021-05-27 21:49:09 +08:00
parent 52d2d75685
commit 10338441ba

View File

@ -227,7 +227,7 @@ func (schema *Schema) ParseField(fieldStruct reflect.StructField) *Field {
if field.HasDefaultValue && !skipParseDefaultValue { if field.HasDefaultValue && !skipParseDefaultValue {
field.DefaultValue = strings.Trim(field.DefaultValue, "'") field.DefaultValue = strings.Trim(field.DefaultValue, "'")
field.DefaultValue = strings.Trim(field.DefaultValue, `\"`) field.DefaultValue = strings.Trim(field.DefaultValue, `"`)
field.DefaultValueInterface = field.DefaultValue field.DefaultValueInterface = field.DefaultValue
} }
case reflect.Struct: case reflect.Struct: