Hi all, I stumbled upon this strange looking piece of code [1]. I thought it dereferences the pointer, creating a copy of the mutex, and then calls RLock() on the copy (i.e. a nop). But it does not work this way. I experimented with it [2] and [3] and it looks like my reading of code is wrong. Could someone explain how dereferencing a pointer works in this case please? Language spec is not very explicit about it (unless I missed it) [4].
Thank you. Mikhail. [1]: https://github.com/open-telemetry/opentelemetry-go/blob/738ef11e3108955b1a2619fd32b39869f2625919/example/prometheus/main.go#L52-L59 [2]: https://play.golang.org/p/9A9pnD5h-GW [3]: https://play.golang.org/p/smzQu9_84dZ [4]: https://golang.org/ref/spec#Address_operators -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CALaYgJXjwO-PSCZ1Jmr%2BHa4wL7dmHRv_i05YQOqvy3BmU4o-HQ%40mail.gmail.com.