Merge pull request #152 from alimy/pr-fatal-info

optimize print fatal info when app run failed
pull/154/head
Michael Li 2 years ago committed by GitHub
commit 848af813c1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -3,6 +3,7 @@ package main
import (
"flag"
"fmt"
"log"
"net/http"
"strings"
@ -62,5 +63,8 @@ func main() {
fmt.Fprintf(color.Output, "PaoPao service listen on %s\n",
color.GreenString(fmt.Sprintf("http://%s:%s", conf.ServerSetting.HttpIp, conf.ServerSetting.HttpPort)),
)
s.ListenAndServe()
if err := s.ListenAndServe(); err != nil {
log.Fatalf("run app failed: %s", err)
}
}

Loading…
Cancel
Save