Consider the following example:
lock.RLock() var product *Product if store[productId] != nil { //cannot convert nil to type Product product = &Product{} *product = *store[productId] //invalid indirect of store[productId] (type Product) } lock.RUnlock()
The exceptions are comments, and I donβt understand what I am doing wrong.
store is map[int]Product
any ideas?
source share