Inspectopedia Help

Mixed value and pointer receivers

Reports structures with methods that use a mixture of types: value and pointer receivers. Such usage is not recommended by the Go Documentation.

For details, see Should I define methods on values or pointers? in the Go FAQ.

Example:

type S struct{ } func (s *S) fun() {} func (s S) fun2() {}

Inspection Details

Available in:

GoLand 2023.3

Plugin:

Go, 233.SNAPSHOT

Last modified: 13 July 2023