golangci-lint #12
@ -22,8 +22,7 @@ import (
|
|||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
if err := run(); err != nil {
|
if err := run(); err != nil {
|
||||||
// TODO: handle this
|
fmt.Fprintf(os.Stderr, "error while running the app: %s\n", err.Error())
|
||||||
panic(err)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -119,7 +118,9 @@ func run() error {
|
|||||||
// Compress responses
|
// Compress responses
|
||||||
n.Use(gzip.Gzip(gzip.DefaultCompression))
|
n.Use(gzip.Gzip(gzip.DefaultCompression))
|
||||||
n.UseHandler(env.Router)
|
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