Switch branches/tags
Nothing to show
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
..
Failed to load latest commit information.
README.md
decorator.go
decorator_test.go

README.md

装饰模式

为类已有功能动态添加更多功能的一种方式;

把类的装饰功能从类中搬出去,简化原有的类;

最好保证装饰类之间彼此独立