IMHO it might be of broader use to lint the cases where a value receiver is 
used and there are assignments to it or its fields ... or is this already 
caught by ineffassign? The recommendation leads to slightly "ugly" 
situations on a regular basis to enforce a pointer receiver on the Stringer 
method just for the sake of symmetry. Or am I misunderstanding this?

On Thursday, December 1, 2022 at 11:33:50 AM UTC+1 nikolay.d...@gmail.com 
wrote:

> *what?*
>
> New go vet compatible linter that detects mixing pointer and value method 
> receivers for the same type.
>
> https://github.com/nikolaydubina/smrcptr
>
> *why?*
>
> It is recommended in Go wiki and in Google Go style guide. It is very 
> common principle to keep code clean in practice and code reviews. Yet, 
> there is no open source linter for this.
>
> Thank you! 🙇🏻‍♂️
>
> -- Nikolay
>

-- 
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/8b0b2aa2-eb9e-4795-b9b6-d9605486d2f2n%40googlegroups.com.

Reply via email to