directory
0.0.0-20230501180844-dca2a0ba871b
Repository: https://github.com/crazybber/go-patterns.git
Documentation: pkg.go.dev
# Packages
No description provided by the author
命令模式(command pattern)主要解耦了行为和接收者,使之可以任意组合为一个完整的命令,并在合适的时候被调用 主要分为四个部分,command ,ConcreteCommand ,receiver ,invoker.
No description provided by the author
中介者模式(mediator pattern) 当两个对象存在复杂的依赖关系时,考虑增加一个中介者使之解耦,使他们不需要进行显式的引用.
备忘录模式 memento pattern 在不影响原结构封装的情况下,能够暂时保存一个结构的状态,并能够恢复 这里是一个游戏存档的例子,尝试保存玩家当前位置,并在读档的时候恢复.
Package main serves as an example application that makes use of the observer pattern.
No description provided by the author
No description provided by the author
存疑部分.
No description provided by the author
存疑的部分.
访问者模式 visitor pattern.