DesignPattern
DesignPattern copied to clipboard
工厂模式是不是存在问题?
type ShoesFactory interface { Product(material string) } 如果要是以上定义 是为了实现这个接口 但是代码中并没有实现这个接口
去掉上面的接口定义 或者将接口改成以下方式 type ShoesFactory interface { Product(material string) Shoe }