* Implement String method for pointers
By implementing this method ourselves using atomic
loading and fmt.Sprint, we can avoid possible unguarded
accesses to the embedded pointer if someone attempts to
fmt.Print the atomic.Pointer
.
* Use Pointer.Load, not wrapped.Load
Co-authored-by: Abhinav Gupta <abg@uber.com>
Adds a Pointer[T] type that provide the same functionality as
Go 1.19's `sync/atomic.Pointer[T]` in both, Go 1.18 and 1.19.
In Go 1.19, this uses the standard library's implementation,
and in 1.18 our own custom implementation based on UnsafePointer.
For Go 1.17, even though it's now unsupported, this is a no-op.
Refs GO-1572
Resolves#115