I am studying Golang - in tutorials I often see syntax like this:
type SomeType struct {
//struct entries
}
Following by:
func (t *SomeType) myFuncName(param1, param2) typeToReturn {
//function body and return
}
Please explain what pointer to the struct (t *SomeType) does there - why it is needed and what is the correct name for this syntax - for it was impossible to find explanation in the official documentation.