golangci-lint #12
@ -22,8 +22,7 @@ import (
|
||||
|
||||
func main() {
|
||||
if err := run(); err != nil {
|
||||
// TODO: handle this
|
||||
panic(err)
|
||||
fmt.Fprintf(os.Stderr, "error while running the app: %s\n", err.Error())
|
||||
}
|
||||
}
|
||||
|
||||
@ -119,7 +118,9 @@ func run() error {
|
||||
// Compress responses
|
||||
n.Use(gzip.Gzip(gzip.DefaultCompression))
|
||||
n.UseHandler(env.Router)
|
||||
n.Run(":" + cf.Port)
|
||||
|
||||
return nil
|
||||
addr := ":" + cf.Port
|
||||
env.Log.Infof("listening on %s", addr)
|
||||
|
||||
return http.ListenAndServe(addr, n)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user