diff options
author | Wim <wim@42.be> | 2018-02-21 00:48:10 +0100 |
---|---|---|
committer | Wim <wim@42.be> | 2018-02-21 00:48:10 +0100 |
commit | 55ab0c12f12e2f0ee15dccd519e1fca4d011b73b (patch) | |
tree | 8d114d1129424e446a0124b9520d2ff3b2175369 /vendor/github.com/labstack/echo/echo.go | |
parent | d1227b5fc9de9f7a04fbf71292dd224aa8806411 (diff) | |
download | matterbridge-msglm-55ab0c12f12e2f0ee15dccd519e1fca4d011b73b.tar.gz matterbridge-msglm-55ab0c12f12e2f0ee15dccd519e1fca4d011b73b.tar.bz2 matterbridge-msglm-55ab0c12f12e2f0ee15dccd519e1fca4d011b73b.zip |
Update vendor labstack/echo
Diffstat (limited to 'vendor/github.com/labstack/echo/echo.go')
-rw-r--r-- | vendor/github.com/labstack/echo/echo.go | 19 |
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) |