In Go language, atomic packages supply lower-level atomic memory that is helpful is implementing synchronization algorithms. The StoreUintptr() function in Go language is used to atomically store val into *addr. This function is defined under the atomic package. Here, you need to import “sync/atomic” package in order to use these functions.
func StoreUintptr(addr *uintptr, val uintptr)
Here, addr indicates address.
Note: (*uintptr) is the pointer to a uintptr value. And uintptr is an integer type that is large too large that it can contain hold the bit pattern of any pointer.
Return Value: It stores the val into *addr and then can be returned when required.
Here, first, the uintptr value is stored in the addresses defined then they are returned using the LoadUintptr() method above.
Here, the value stored and loaded are the same so true is returned but their addresses are not the same so false is returned in that case.