Support nillable fields.
This commit is contained in:
parent
7ff1e3f9d2
commit
b8d8184bda
2 changed files with 2 additions and 9 deletions
|
|
@ -65,7 +65,8 @@ func fieldIsPointer(f *gen.Field) bool {
|
|||
case f.Type.Type == field.TypeBool:
|
||||
return false
|
||||
case f.Optional,
|
||||
f.Default:
|
||||
f.Default,
|
||||
f.Nillable:
|
||||
return true
|
||||
}
|
||||
return false
|
||||
|
|
@ -79,9 +80,3 @@ func upperFirst(s string) string {
|
|||
out[0] = unicode.ToUpper(out[0])
|
||||
return string(out)
|
||||
}
|
||||
|
||||
/*
|
||||
TODO:
|
||||
1) How to handle fields like password that need to be transformed or omitted, etc?
|
||||
2) Should we use the HTML datetime format and string fields rather than time.Time?
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue