go-pattern-examples/behavior/16_state/README.md

4 lines
251 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 状态模式
状态模式的意图是将状态和行为分类go语言自身的结构和接口实现就是一个状态模式因为结构本身往往是有状态的表示行为的接口可以组合到结构上形成完整的功能单元.