问题内容我定义一个struct并这样实现一个方法gotypeRectstruct{x,yfloat64width,heightfloat64}func(rRect)Area()float64{returnr.width*r.height}为什么我两种实例化的方式都可以调用到Areag
go中struct初始化的问题?
