Nullable time.Time

后端 未结 4 1853
醉酒成梦
醉酒成梦 2020-12-08 00:26

I have a struct that I intend to populate with a database record, one of the datetime columns is nullable:

type Reminder struct {
    Id         int
    Crea         


        
4条回答
  •  伪装坚强ぢ
    2020-12-08 01:20

    mysql.NullTime is depricated https://github.com/go-sql-driver/mysql/issues/960 database/sql will have a NullTime type from Go1.13 onward, which should be used instead https://github.com/golang/go/issues/30305

提交回复
热议问题