Hide complete msg on DisableStartupMessage

pull/432/head
Fenny 2020-06-01 20:29:52 +02:00
parent 4f08c08459
commit ae785453bb
1 changed files with 4 additions and 3 deletions

7
app.go
View File

@ -89,7 +89,7 @@ type Settings struct {
// By default all header names are normalized: conteNT-tYPE -> Content-Type
DisableHeaderNormalizing bool // default: false
// When set to true, it will not print out the «Fiber» ASCII art
// When set to true, it will not print out the «Fiber» ASCII art and listening address
DisableStartupMessage bool // default: false
// Templates is the interface that wraps the Render function.
@ -301,8 +301,9 @@ func (app *App) Serve(ln net.Listener, tlsconfig ...*tls.Config) error {
// Print startup message
if !app.Settings.DisableStartupMessage {
fmt.Printf(" _______ __\n ____ / ____(_) /_ ___ _____\n_____ / /_ / / __ \\/ _ \\/ ___/\n __ / __/ / / /_/ / __/ /\n /_/ /_/_.___/\\___/_/ v%s\n", Version)
fmt.Printf("Started listening on %s\n", ln.Addr().String())
}
fmt.Printf("Started listening on %s\n", ln.Addr().String())
return app.server.Serve(ln)
}
@ -342,8 +343,8 @@ func (app *App) Listen(address interface{}, tlsconfig ...*tls.Config) error {
// Print startup message
if !app.Settings.DisableStartupMessage && !utils.GetArgument("-child") {
fmt.Printf(" _______ __\n ____ / ____(_) /_ ___ _____\n_____ / /_ / / __ \\/ _ \\/ ___/\n __ / __/ / / /_/ / __/ /\n /_/ /_/_.___/\\___/_/ v%s\n", Version)
fmt.Printf("Started listening on %s\n", ln.Addr().String())
}
fmt.Printf("Started listening on %s\n", ln.Addr().String())
return app.server.Serve(ln)
}