模板中怎么调用struct的方法

kingkazma · · 3702 次点击
polaris
社区,需要你我一同完善!
这种写法:{{ .user.SayHello }} 是对的,不过有一点,执行 template 的 Execute 时,user 需要是指针类型。
#1