1
0
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:
Vishal Rana
2015-04-18 21:46:00 -07:00
parent a9c41b367c
commit f134ea3aea
10 changed files with 79 additions and 60 deletions

View File

@@ -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