This topic created in 5063 days ago, the information mentioned may be changed or developed.
看了一下其他方面都很不错,但没有继承,光有接口的话,那相同的类属性,是不是都要重复声明?
6 replies • 1970-01-01 08:00:00 +08:00
 |
|
不需要,因为有embedded struct
|
 |
|
struct有匿名字段可用
|
 |
|
type A struct { }
type B struct { A }
|
 |
|
细追究它还没有类呢,呵呵,实现面向对象的不同方式了。
|
 |
|
3楼正解
|