Originally has several chapter. I read and rewrite, learn for each of this 42 patterns.
Then, it extends to more broadly, after I participate in the course Go 语言编程模式实战
I derive my thoughts on this material under Topics
folder,
Feel free to reproduce and practice.
Go 语言设计模式的实例代码
- 简单工厂模式(Simple Factory)
- 工厂方法模式(Factory Method)
- 抽象工厂模式(Abstract Factory)
- 创建者模式(Builder)
- 原型模式(Prototype)
- 单例模式(Singleton)
- 中介者模式(Mediator)
- 观察者模式(Observer)
- 命令模式(Command)
- 迭代器模式(Iterator)
- 模板方法模式(Template Method)
- 策略模式(Strategy)
- 状态模式(State)
- 备忘录模式(Memento)
- 解释器模式(Interpreter)
- 职责链模式(Chain of Responsibility)
- 访问者模式(Visitor)
https://github.com/pkg/errors
https://jxck.hatenablog.com/entry/golang-error-handling-lesson-by-rob-pike
https://go.dev/blog/errors-are-values