Golang“ func(t * SomeType)myFuncName(param1,param2)”语法的含义是什么

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.

That's a type definition followed by a method function definition with a pointer receiver of the defined type. See the Go Language Specification on Method Sets.

So

package main

import(
    "fmt"
)

type TD struct {
    Foo     string
}

func (td *TD) Bar() {
    td.Foo = `bar`
}

func main() {
    a := new(TD)
    a.Bar()
    fmt.Println(a.Foo)
}

prints bar

It's somewhat similar to a class definition followed by a method definition in some other languages.