Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InterfaceComputer ¶
type InterfaceComputer interface {
SetColor(color string)
SetSize(size int)
GetColor() string
GetSize() int
}
定义电脑接口
type InterfaceElectronicFactory ¶
type InterfaceElectronicFactory interface {
MakePhone() InterfacePhone
MakeComputer() InterfaceComputer
}
电子产品工厂
func GetElectronicFactory ¶
func GetElectronicFactory(brand string) (InterfaceElectronicFactory, error)
获取电子产品工厂
type InterfacePhone ¶
type InterfacePhone interface {
SetColor(color string)
SetSize(size int)
GetColor() string
GetSize() int
}
定义手机接口
Click to show internal directories.
Click to hide internal directories.