sourcegraph/lib/pointers
Milan Freml c31e079b5b
[chore] Refactored to use common pointers helper functions (#53441)
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.
2023-06-14 16:48:44 +02:00
..
BUILD.bazel [chore] Refactored to use common pointers helper functions (#53441) 2023-06-14 16:48:44 +02:00
ptr_test.go [chore] Refactored to use common pointers helper functions (#53441) 2023-06-14 16:48:44 +02:00
ptr.go [chore] Refactored to use common pointers helper functions (#53441) 2023-06-14 16:48:44 +02:00