我想知道是否可以使用反射或其他方式从类型化函数中获取方法字段。我要解决的问题是我有一个方法接受特定类型的函数,但我需要实际传输不同的类型并根据提供的类型执行操作。我知道我可以使用interface{}值作为接收者,但我不想放松对调用函数(“GetIt”)的类型检查packagemaintypettpstruct{Couponsstring}func(mttp)GetIt(xstring){ifm.Coupons!=""{print(m.Coupons)}}funccalculate(mthfunc(sstring)){//performcalculationsandupdatetheC