Commits


Matt Topol authored and GitHub committed 62e1e9ad764
GH-38795: [Go] Fix race GetToTimeFunc for Timestamp (#38797) ### Rationale for this change Adding RWMutex to protect `loc` in `TimestampType` and fix the race condition. ### Are these changes tested? Yes, a unit test is added which is covered by the CI which runs with `-race`. ### Are there any user-facing changes? Copying `TimestampType` will now be problematic and linters will show it as an error. In theory this shouldn't be a problem as most uses of TimestampType should be utilizing pointers to it rather than the value directly. * Closes: #38795 Lead-authored-by: Matt Topol <zotthewizard@gmail.com> Co-authored-by: Benjamin Kietzman <bengilgit@gmail.com> Co-authored-by: Ben Harkins <60872452+benibus@users.noreply.github.com> Signed-off-by: Benjamin Kietzman <bengilgit@gmail.com>