summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/labstack/echo/echo.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/labstack/echo/echo.go')
-rw-r--r--vendor/github.com/labstack/echo/echo.go19
1 files changed, 10 insertions, 9 deletions
diff --git a/vendor/github.com/labstack/echo/echo.go b/vendor/github.com/labstack/echo/echo.go
index 77c238d0..4a54b31a 100644
--- a/vendor/github.com/labstack/echo/echo.go
+++ b/vendor/github.com/labstack/echo/echo.go
@@ -76,6 +76,7 @@ type (
DisableHTTP2 bool
Debug bool
HideBanner bool
+ HidePort bool
HTTPErrorHandler HTTPErrorHandler
Binder Binder
Validator Validator
@@ -213,7 +214,7 @@ const (
)
const (
- version = "3.2.5"
+ version = "3.2.6"
website = "https://echo.labstack.com"
// http://patorjk.com/software/taag/#p=display&f=Small%20Slant&t=Echo
banner = `
@@ -414,9 +415,9 @@ func (e *Echo) TRACE(path string, h HandlerFunc, m ...MiddlewareFunc) *Route {
// Any registers a new route for all HTTP methods and path with matching handler
// in the router with optional route-level middleware.
func (e *Echo) Any(path string, handler HandlerFunc, middleware ...MiddlewareFunc) []*Route {
- routes := make([]*Route, 0)
- for _, m := range methods {
- routes = append(routes, e.Add(m, path, handler, middleware...))
+ routes := make([]*Route, len(methods))
+ for i, m := range methods {
+ routes[i] = e.Add(m, path, handler, middleware...)
}
return routes
}
@@ -424,9 +425,9 @@ func (e *Echo) Any(path string, handler HandlerFunc, middleware ...MiddlewareFun
// Match registers a new route for multiple HTTP methods and path with matching
// handler in the router with optional route-level middleware.
func (e *Echo) Match(methods []string, path string, handler HandlerFunc, middleware ...MiddlewareFunc) []*Route {
- routes := make([]*Route, 0)
- for _, m := range methods {
- routes = append(routes, e.Add(m, path, handler, middleware...))
+ routes := make([]*Route, len(methods))
+ for i, m := range methods {
+ routes[i] = e.Add(m, path, handler, middleware...)
}
return routes
}
@@ -644,7 +645,7 @@ func (e *Echo) StartServer(s *http.Server) (err error) {
return err
}
}
- if !e.HideBanner {
+ if !e.HidePort {
e.colorer.Printf("⇨ http server started on %s\n", e.colorer.Green(e.Listener.Addr()))
}
return s.Serve(e.Listener)
@@ -656,7 +657,7 @@ func (e *Echo) StartServer(s *http.Server) (err error) {
}
e.TLSListener = tls.NewListener(l, s.TLSConfig)
}
- if !e.HideBanner {
+ if !e.HidePort {
e.colorer.Printf("⇨ https server started on %s\n", e.colorer.Green(e.TLSListener.Addr()))
}
return s.Serve(e.TLSListener)