go-pattern-examples/gomore/03_context/README.md
2020-05-07 11:47:50 +08:00

8 lines
290 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.

# 上下文模式
上下文模式,就是使用上下传递参数,或者传递操作。
其实在,观察者模式中,就有用到上下文模式传递参数:[观察模式中的上下文模式](../../behavior/03_observer)
这是演示使用context取消http请求的场景。