mirror of
https://github.com/kataras/iris.git
synced 2025-12-19 19:07:06 +00:00
more checks about creating new instance of controller on each request - this time if all bindings are static then set them to the initial-devpassed controller and if the total number of lengths are equal with these static dependencies then we ignore the injector and use the initial controller on each request - maximize the performance when simple controller is used - need more cleanup before new release but I hope until Christmas iris developers will be amazed
Former-commit-id: 32ed69368d1df2c25cdb712bb7f0cf47b2e36c05
This commit is contained in:
@@ -821,6 +821,8 @@ type Context interface {
|
||||
String() string
|
||||
}
|
||||
|
||||
var _ Context = (*context)(nil)
|
||||
|
||||
// Next calls all the next handler from the handlers chain,
|
||||
// it should be used inside a middleware.
|
||||
func Next(ctx Context) {
|
||||
|
||||
@@ -83,7 +83,7 @@ type GzipResponseWriter struct {
|
||||
disabled bool
|
||||
}
|
||||
|
||||
var _ ResponseWriter = &GzipResponseWriter{}
|
||||
var _ ResponseWriter = (*GzipResponseWriter)(nil)
|
||||
|
||||
// BeginGzipResponse accepts a ResponseWriter
|
||||
// and prepares the new gzip response writer.
|
||||
|
||||
@@ -39,7 +39,7 @@ type ResponseRecorder struct {
|
||||
headers http.Header
|
||||
}
|
||||
|
||||
var _ ResponseWriter = &ResponseRecorder{}
|
||||
var _ ResponseWriter = (*ResponseRecorder)(nil)
|
||||
|
||||
// Naive returns the simple, underline and original http.ResponseWriter
|
||||
// that backends this response writer.
|
||||
|
||||
@@ -115,7 +115,7 @@ type responseWriter struct {
|
||||
beforeFlush func()
|
||||
}
|
||||
|
||||
var _ ResponseWriter = &responseWriter{}
|
||||
var _ ResponseWriter = (*responseWriter)(nil)
|
||||
|
||||
const (
|
||||
defaultStatusCode = http.StatusOK
|
||||
|
||||
Reference in New Issue
Block a user