Go

Go

Made by DeepSource

Method declaration preceding the type definition GO-C4009

Style
Minor

It is idiomatic for the type definition to be before the method declarations.

Bad practice

func (d data) method() {}

type data struct{}

Recommended

type data struct{}

func (d data) method() {}