vendredi 24 juin 2016

Go, Why shouldn't use "this" for method receiver name

I use VS Code Go extension.

Here's my code

func (this *MyClass) Xxx() error {}

And It's mention me this

exported method MyClass.Xxx should have comment or be unexported receiver name should be a reflection of its identity; don't use generic names such as "me", "this", or "self";





Aucun commentaire:

Enregistrer un commentaire