mirror of
https://github.com/labstack/echo.git
synced 2025-11-29 22:48:07 +02:00
Change middleware function signature.
Signed-off-by: Vishal Rana <vr@labstack.com>
This commit is contained in:
@@ -3,6 +3,8 @@ package echo
|
||||
import (
|
||||
"log"
|
||||
"net/http"
|
||||
|
||||
"labstack.com/gommon/color"
|
||||
)
|
||||
|
||||
type (
|
||||
@@ -21,7 +23,7 @@ func (r *response) Header() http.Header {
|
||||
func (r *response) WriteHeader(n int) {
|
||||
if r.committed {
|
||||
// TODO: Warning
|
||||
log.Println("echo: response already committed")
|
||||
log.Println(color.Yellow("echo: response already committed"))
|
||||
return
|
||||
}
|
||||
r.status = n
|
||||
|
||||
Reference in New Issue
Block a user