错别字;
水底沉星
5年前
修改理由:
相关信息:
- 类型:文档文章
- 文章: Context 机制
- 文档: 《Iris 框架中文文档(10)》
此投稿已在 5年前 合并。
内容修改:
Old | New | Differences |
---|---|---|
1 | ||
2 | 1 | `iris.Context` 的源代码可以在 [这里](https://github.com/kataras/iris/blob/master/context/context.go) 找到。使用 IDE/Editor 的自动完成功能将会很大程度的帮到你。 |
3 | 2 | |
4 | 3 | ``` | … | … |
11 | 10 | // 开发者获取请求信息从客户端的请求上下文中。 |
12 | 11 | // |
13 | 12 | // context 是 context.Context 子包的一个实现。 |
14 | // context.Context 是很好扩展,所以开发者可以按照实际所需 | |
13 | // context.Context 是很好扩展,所以开发者可以按照实际所需重写它的方法。 | |
15 | 14 | type Context interface { |
16 | 15 | // ResponseWriter 如期返回一个兼容 http.ResponseWriter 的 响应writer。 |
17 | 16 | ResponseWriter() ResponseWriter | … | … |
62 | 61 | Skip() |
63 | 62 | // 如果调用了 StopExecution ,接下来的 .Next 调用将被局略。 |
64 | 63 | StopExecution() |
65 | // IsStopped 检查 | |
64 | // IsStopped 检查当前位置的Context是否是255, 如果是, 则返回true, 意味着 StopExecution() 被调用了。 | |
66 | 65 | IsStopped() bool |
67 | 66 | |
68 | 67 | // +------------------------------------------------------------+ |