mirror of
https://github.com/labstack/echo.git
synced 2025-01-12 01:22:21 +02:00
Adds a separate flag for the 'http/https server started on' message (#1043)
This commit is contained in:
parent
da083ffd0a
commit
c8bedd1cf9
5
echo.go
5
echo.go
@ -76,6 +76,7 @@ type (
|
||||
DisableHTTP2 bool
|
||||
Debug bool
|
||||
HideBanner bool
|
||||
HidePort bool
|
||||
HTTPErrorHandler HTTPErrorHandler
|
||||
Binder Binder
|
||||
Validator Validator
|
||||
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user