mirror of
https://github.com/kataras/iris.git
synced 2025-03-14 08:16:28 +01:00
doc: minor
Former-commit-id: 649e2d673a834625d5f3e8703533ad1db2553aec
This commit is contained in:
parent
c18106166b
commit
3faaf954bb
|
@ -3,6 +3,6 @@ module github.com/kataras/iris/_examples/apidoc/yaag
|
||||||
go 1.14
|
go 1.14
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/betacraft/yaag v1.0.1-0.20191027021412-565f65e36090
|
github.com/betacraft/yaag v1.0.1-0.20200719063524-47d781406108
|
||||||
github.com/kataras/iris/v12 v12.1.9-0.20200718094131-5228aa163dc9
|
github.com/kataras/iris/v12 v12.1.9-0.20200719040914-c21125c094d6
|
||||||
)
|
)
|
||||||
|
|
|
@ -4,6 +4,6 @@ go 1.14
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/joho/godotenv v1.3.0
|
github.com/joho/godotenv v1.3.0
|
||||||
github.com/kataras/iris/v12 v12.1.9-0.20200718094131-5228aa163dc9
|
github.com/kataras/iris/v12 v12.1.9-0.20200719040914-c21125c094d6
|
||||||
go.mongodb.org/mongo-driver v1.3.4
|
go.mongodb.org/mongo-driver v1.3.4
|
||||||
)
|
)
|
||||||
|
|
|
@ -4,6 +4,6 @@ go 1.14
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/go-sql-driver/mysql v1.5.0
|
github.com/go-sql-driver/mysql v1.5.0
|
||||||
github.com/kataras/iris/v12 v12.1.9-0.20200718094131-5228aa163dc9
|
github.com/kataras/iris/v12 v12.1.9-0.20200719040914-c21125c094d6
|
||||||
github.com/mailgun/groupcache/v2 v2.1.0
|
github.com/mailgun/groupcache/v2 v2.1.0
|
||||||
)
|
)
|
||||||
|
|
|
@ -4,5 +4,5 @@ go 1.14
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/Shopify/sarama v1.26.4
|
github.com/Shopify/sarama v1.26.4
|
||||||
github.com/kataras/iris/v12 v12.1.9-0.20200718094131-5228aa163dc9
|
github.com/kataras/iris/v12 v12.1.9-0.20200719040914-c21125c094d6
|
||||||
)
|
)
|
||||||
|
|
|
@ -2,4 +2,4 @@ module app
|
||||||
|
|
||||||
go 1.14
|
go 1.14
|
||||||
|
|
||||||
require github.com/kataras/iris/v12 v12.1.9-0.20200718094131-5228aa163dc9
|
require github.com/kataras/iris/v12 v12.1.9-0.20200719040914-c21125c094d6
|
||||||
|
|
|
@ -4,5 +4,5 @@ go 1.14
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/googollee/go-socket.io v1.4.3-0.20191109153049-7451e2f8c2e0
|
github.com/googollee/go-socket.io v1.4.3-0.20191109153049-7451e2f8c2e0
|
||||||
github.com/kataras/iris/v12 v12.1.9-0.20200718094131-5228aa163dc9
|
github.com/kataras/iris/v12 v12.1.9-0.20200719040914-c21125c094d6
|
||||||
)
|
)
|
||||||
|
|
|
@ -335,7 +335,10 @@ func (ctx *Context) ResponseWriter() ResponseWriter {
|
||||||
return ctx.writer
|
return ctx.writer
|
||||||
}
|
}
|
||||||
|
|
||||||
// ResetResponseWriter should change or upgrade the context's ResponseWriter.
|
// ResetResponseWriter sets a new ResponseWriter implementation
|
||||||
|
// to this Context to use as its writer.
|
||||||
|
// Note, to change the underline http.ResponseWriter use
|
||||||
|
// ctx.ResponseWriter().SetWriter(http.ResponseWRiter) instead.
|
||||||
func (ctx *Context) ResetResponseWriter(newResponseWriter ResponseWriter) {
|
func (ctx *Context) ResetResponseWriter(newResponseWriter ResponseWriter) {
|
||||||
ctx.writer = newResponseWriter
|
ctx.writer = newResponseWriter
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,11 +24,12 @@ type ResponseWriter interface {
|
||||||
// Naive returns the simple, underline and original http.ResponseWriter
|
// Naive returns the simple, underline and original http.ResponseWriter
|
||||||
// that backends this response writer.
|
// that backends this response writer.
|
||||||
Naive() http.ResponseWriter
|
Naive() http.ResponseWriter
|
||||||
|
// SetWriter sets the underline http.ResponseWriter
|
||||||
|
// that this responseWriter should write on.
|
||||||
|
SetWriter(underline http.ResponseWriter)
|
||||||
// BeginResponse receives an http.ResponseWriter
|
// BeginResponse receives an http.ResponseWriter
|
||||||
// and initialize or reset the response writer's field's values.
|
// and initialize or reset the response writer's field's values.
|
||||||
BeginResponse(http.ResponseWriter)
|
BeginResponse(http.ResponseWriter)
|
||||||
|
|
||||||
// EndResponse is the last function which is called right before the server sent the final response.
|
// EndResponse is the last function which is called right before the server sent the final response.
|
||||||
//
|
//
|
||||||
// Here is the place which we can make the last checks or do a cleanup.
|
// Here is the place which we can make the last checks or do a cleanup.
|
||||||
|
@ -168,6 +169,12 @@ func (w *responseWriter) BeginResponse(underline http.ResponseWriter) {
|
||||||
w.beforeFlush = nil
|
w.beforeFlush = nil
|
||||||
w.written = NoWritten
|
w.written = NoWritten
|
||||||
w.statusCode = defaultStatusCode
|
w.statusCode = defaultStatusCode
|
||||||
|
w.SetWriter(underline)
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetWriter sets the underline http.ResponseWriter
|
||||||
|
// that this responseWriter should write on.
|
||||||
|
func (w *responseWriter) SetWriter(underline http.ResponseWriter) {
|
||||||
w.ResponseWriter = underline
|
w.ResponseWriter = underline
|
||||||
|
|
||||||
pusher, ok := underline.(http.Pusher)
|
pusher, ok := underline.(http.Pusher)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user