61 lines
1.7 KiB
Markdown
61 lines
1.7 KiB
Markdown
# golang-design-patterns
|
||
|
||
## 使用golang实现各种设计模式
|
||
|
||
> golang的最佳实践中并不建议在应用中使用大量的设计模式,望周知
|
||
|
||
> Keep It Simple, Stupid.
|
||
|
||
- 创建型模式
|
||
|
||
1. [单例模式](https://github.com/silsuer/golang-design-patterns/blob/master/singleton/README.md)
|
||
|
||
2. [简单工厂模式](https://github.com/silsuer/golang-design-patterns/tree/master/simple-factory-pattern)
|
||
|
||
3. [工厂方法模式](https://github.com/silsuer/golang-design-patterns/tree/master/factory-method-pattern)
|
||
|
||
4. [抽象工厂模式](https://github.com/silsuer/golang-design-patterns/tree/master/abstract-factory-pattern)
|
||
|
||
5. [建造者模式](https://github.com/silsuer/golang-design-patterns/tree/master/builder-pattern)
|
||
|
||
6. [原型模式](https://github.com/silsuer/golang-design-patterns/tree/master/prototype-pattern)
|
||
|
||
- 行为型模式
|
||
|
||
1. [访问者模式](https://github.com/silsuer/golang-design-patterns/tree/master/visitor-pattern)
|
||
|
||
2. [模板模式](https://github.com/silsuer/golang-design-patterns/tree/master/template-pattern)
|
||
|
||
3. 策略模式
|
||
|
||
4. 状态模式
|
||
|
||
5. [观察者模式](https://github.com/silsuer/golang-design-patterns/tree/master/observer-pattern)
|
||
|
||
6. [备忘录模式](https://github.com/silsuer/golang-design-patterns/tree/master/memento-pattern)
|
||
|
||
7. [中介者模式](https://github.com/silsuer/golang-design-patterns/tree/master/mediator-pattern)
|
||
|
||
8. [迭代器模式](https://github.com/silsuer/golang-design-patterns/tree/master/iterator-pattern)
|
||
|
||
9. 解释器模式
|
||
|
||
10. 命令模式
|
||
|
||
11. 责任链模式
|
||
|
||
- 结构型模式
|
||
|
||
1. 适配器模式
|
||
|
||
2. 桥接模式
|
||
|
||
3. 组合模式
|
||
|
||
4. 装饰模式
|
||
|
||
5. 外观模式
|
||
|
||
6. 亨元模式
|
||
|
||
7. 代理模式 |