Assume I have a struct with updatedAt time.Time, which has zero value until actual update is in place. How is this usually solved in Go?
Saving this to a database doesn't cause problems, but reading does - I managed to not use sql.NullTime by not making the field nullable in the db but save 0000-00-00 00:00:00 instead.
Another gimmick appears when marshaling (encoding) to JSON - by default it will return 0001-01-01 something (time.Time's zero value equivalent). Is there any tag that inserts null on zero value, or I do have to create my own type or marshal method and handle that manually?