1
0
mirror of https://github.com/labstack/echo.git synced 2025-12-24 00:01:26 +02:00
Signed-off-by: Vishal Rana <vr@labstack.com>
This commit is contained in:
Vishal Rana
2015-07-27 08:43:11 -07:00
parent 1ae7ef40e0
commit d077efe91a
4 changed files with 20 additions and 29 deletions

19
echo.go
View File

@@ -137,18 +137,6 @@ const (
)
var (
methods = [...]string{
CONNECT,
DELETE,
GET,
HEAD,
OPTIONS,
PATCH,
POST,
PUT,
TRACE,
}
//--------
// Errors
//--------
@@ -156,6 +144,7 @@ var (
UnsupportedMediaType = errors.New("echo ⇒ unsupported media type")
RendererNotRegistered = errors.New("echo ⇒ renderer not registered")
InvalidRedirectCode = errors.New("echo ⇒ invalid redirect status code")
//----------------
// Error handlers
//----------------
@@ -222,7 +211,11 @@ func (e *Echo) Router() *Router {
// ColoredLog enable/disable colored log.
func (e *Echo) ColoredLog(on bool) {
color.Disable()
if on {
color.Enable()
} else {
color.Disable()
}
}
// HTTP2 enable/disable HTTP2 support.