Re: [go-nuts] Best practice for Method Receivers

2017-03-27 Thread Ayan George
On 03/24/2017 09:20 PM, st ov wrote: > Is it idiomatic to mix-&-match pointer and value method receivers for > a given type? or in *_general_*, if a single method requires a > pointer receiver than *all methods* should take a pointer, regardless > if a value receiver is appropriate? > > For exa

[go-nuts] Best practice for Method Receivers

2017-03-24 Thread st ov
Is it idiomatic to mix-&-match pointer and value method receivers for a given type? or in *general*, if a single method requires a pointer receiver than *all methods* should take a pointer, regardless if a value receiver is appropriate? For example, should Foo.SetVal also be a pointer receiver