修复了当字段类型为bool或者string类型并且默认值为NULL时,在结构中没有被设置成指针类型的问题

master
jiang4869 3 years ago
parent a0908b00bc
commit b056057690

@ -103,6 +103,12 @@ func fixNullToPorint(name string, isNull bool) string {
if strings.HasPrefix(name, "time") { if strings.HasPrefix(name, "time") {
return "*" + name return "*" + name
} }
if strings.HasPrefix(name, "bool") {
return "*" + name
}
if strings.HasPrefix(name, "string") {
return "*" + name
}
} }
return name return name

Loading…
Cancel
Save