Nullable time.Time

后端 未结 4 1856
醉酒成梦
醉酒成梦 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 00:55

    Might also want to check the go-sql-driver implementation, which is basically the same thing as recommended above. https://godoc.org/github.com/go-sql-driver/mysql#NullTime

提交回复
热议问题