是否可以将结构体上的方法作为golang中的回调函数传递?

例如注册消息处理程序:

非常感谢您!

Golang具有一流的功能,您可以将它们作为参数传递https://golang.org/doc/codewalk/functions/
您可能还想看看这个https://dave.cheney.net/2016/11/13/do-not-fear-first-class-functions

您写的内容似乎是正确的。