build get set null value
This commit is contained in:
parent
e84d973c29
commit
2d04035236
7
get.go
7
get.go
|
@ -32,3 +32,10 @@ func GetTime(val null.Time) (res time.Time) {
|
|||
}
|
||||
return val.Time
|
||||
}
|
||||
|
||||
func GetJSON(val null.JSON) (res []byte) {
|
||||
if !val.Valid {
|
||||
return
|
||||
}
|
||||
return val.JSON
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue