example

package
v0.0.0-...-05962f3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 9, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConcreteFactory

type ConcreteFactory struct {
}

具体工厂

func (*ConcreteFactory) FactoryMethod

func (cf *ConcreteFactory) FactoryMethod(owner string) Product

具体工厂的工厂方法

type ConcreteProduct

type ConcreteProduct struct {
}

具体产品

func (*ConcreteProduct) Use

func (p *ConcreteProduct) Use()

具体产品的方法

type Factory

type Factory interface {
	FactoryMethod(owner string) Product
}

工厂接口

type Product

type Product interface {
	Use()
}

产品

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL