4
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2025-09-06 10:14:10 +00:00

Update vendor labstack/echo

This commit is contained in:
Wim
2018-02-21 00:48:10 +01:00
parent d1227b5fc9
commit 55ab0c12f1
22 changed files with 366 additions and 216 deletions

View File

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