In Go language, atomic packages supply lower-level atomic memory that is helpful is implementing synchronization algorithms. The StoreUint32() 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 StoreUint32(addr *uint32, val uint32)
Here, addr indicates address.
Note: (*uint32) is the pointer to a uint32 value. However, int32 contains the set of all unsigned 32-bit integers from 0 to 4294967295.
Return value: It stores the val into *addr and then can be returned when required.
Here, first, the uint32 value is stored in the addresses defined then they are returned using the LoadUint32() method above.
Here, the value stored and loaded are same so true is returned but their addresses are not same so false is returned in that case.