Original post

I’m trying to leave some null field in my database (like delete_date, and so on)… but time.Time is not nulleable. I was looking on the internet but I found that I have to use a library for this? wtf .

My struct is something like this:

type User struct {
    Username string
    PasswordHash string
    CreationDate time.Time // this will never be null since it's time.Now()
    DeleteDate time.Time
}

Is there practical any workaround?