1
0
mirror of https://github.com/labstack/echo.git synced 2025-07-03 00:56:59 +02:00
Signed-off-by: Vishal Rana <vr@labstack.com>
This commit is contained in:
Vishal Rana
2015-11-20 19:13:22 -08:00
parent c578a662a0
commit 4f996419e1
7 changed files with 38 additions and 31 deletions

View File

@ -2,11 +2,10 @@ package echo
import (
"bufio"
"log"
"net"
"net/http"
"github.com/labstack/gommon/color"
"github.com/labstack/gommon/log"
)
type (
@ -36,8 +35,7 @@ func (r *Response) Writer() http.ResponseWriter {
func (r *Response) WriteHeader(code int) {
if r.committed {
// TODO: Warning
log.Printf("echo => %s", color.Yellow("response already committed"))
log.Warn("response already committed")
return
}
r.status = code