Skip to content

工厂模式是不是存在问题? #1

@guanzenbin

Description

@guanzenbin

type ShoesFactory interface {
Product(material string)
}
如果要是以上定义 是为了实现这个接口 但是代码中并没有实现这个接口

去掉上面的接口定义 或者将接口改成以下方式
type ShoesFactory interface {
Product(material string) Shoe
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions