mirror of
https://github.com/sourcegraph/sourcegraph.git
synced 2026-02-06 20:31:48 +00:00
Originally I started working on this because of [comment on another PR](https://github.com/sourcegraph/sourcegraph/pull/53373#discussion_r1228058455). I quickly wrote an implementation of Ptr and NonZeroPtr. Then I started refactoring existing code only to find out that @efritz already beat me to it. But Erics implementation was hidden in internal/codeintel/resolvers/utils.go Moved all of the Ptr functions to `pointers` package instead and refactored all existing code that I could find to use it instead of redefining the same functions all the time. Usage is mostly in tests, so hopefully the impact is not as huge as the diff size might suggest. ## Test plan A whole lot of unit tests. |
||
|---|---|---|
| .. | ||
| BUILD.bazel | ||
| ptr_test.go | ||
| ptr.go | ||