I've always try to start with a value receiver,
change to pointer receiver (EVERYWHERE - do not mix pointer and value 
receivers!),
when the method modifies the sruct's members (or just have a sync.Mutex 
member),
or used as interface (i.e. error  - for comparison to nil)

Oliver Lowe a következőt írta (2023. november 14., kedd, 0:23:44 UTC+1):

> > I'd be curious to hear thoughts on this topic.
>
> There was a fun talk at GopherConAU just a few days ago: "What's
> The Point? A Guide To Using Pointers Without Panicking" (talk
> description at https://gophercon.com.au/) When the recordings are
> all finalised I can reply to this thread with a link.
>

-- 
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/c4bd392c-8561-4cde-89f0-677fde9ea241n%40googlegroups.com.

Reply via email to