标题基本上说明了一切..
我可以在运行时创建一个返回另一个 Go 方法的 Go 方法吗?一个简单的例子:
type Person struct {
name string
age uint
}
func (p Person) createGetNameMethod() /*return signature is a method for Person*/ {
return /*return a new anonymous method here for Person*/
}
隔江千里
手掌心
随时随地看视频慕课网APP
相关分类