type someStruct struct {
...
}func (s *someStruct) method1([]int, int) int
func (s *someStruct) method2([]int, int) int
...type methodPtr func (*someStruct, []int, int) intvar m = map[int]methodPtr{
0: (&someStruct).method1
}
var m = map[int]methodPtr{
0: (*someStruct).method1,
}Работающий код https://go.dev/play/p/0TqJTmuEGHU