nats-io / nats-server

High-Performance server for NATS.io, the cloud and edge native messaging system.
https://nats.io
Apache License 2.0
16.03k stars 1.41k forks source link

Using Pointer Receiver and Value Receiver #5964

Closed Coen90 closed 1 month ago

Coen90 commented 1 month ago

Proposed change

Hello. I saw that readCacheFlag is using Value Receiver on in server/client.go. I think there is no reason to use Value Receiver instead of Pointer Receiver. And also If there is any reason to use Value Receiver, please let me know why! It would be helpful to understand your code :)

Use case

I think using pointer receiver is better in this case.

Contribution

Yes. I would like to contribute to this issue.

neilalexander commented 1 month ago

Closing due to https://github.com/nats-io/nats-server/pull/5965#issuecomment-2396287824.