Changeset panic when replacing *time.Time with nil
- Dominant language
- Go
- Stars
- 786
- Forks
- 61
- Avg merge
- 4d 11h
- Merged PRs (30d)
- 2
Description
Forgive if I'm wrong, I'm slightly lost in pointers. I have a field type *time.Time, I load a record where that is set, create a changeset on it, change the field to nil, update, and hit a panic here: https://github.com/go-rel/rel/blob/e5555d0cb11d016ab4bcd74e8df478321d1956ea/changeset.go#L27.
I think that sql.NullTime works fine. And in my case I don't really need the changeset, so I would call this low-priority. Thanks.
Contributor guide
Research direction
Start at changeset.go line 27 and trace the changeset path when a loaded *time.Time field is changed to nil. Reproduce the update described in the issue, comparing it with the reported working behavior of sql.NullTime. Done means replacing a non-nil *time.Time with nil no longer panics during update.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, sql
- Domain
- backend, databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100