resolve linter issues

This commit is contained in:
David Christofas
2021-02-25 14:53:56 +01:00
parent 0802e8aac3
commit 902977cb60
4 changed files with 28 additions and 6 deletions
+6 -2
View File
@@ -33,7 +33,9 @@ func health(cfg *config.Config) func(http.ResponseWriter, *http.Request) {
// TODO(tboerger): check if services are up and running
io.WriteString(w, http.StatusText(http.StatusOK))
if _, err := io.WriteString(w, http.StatusText(http.StatusOK)); err != nil {
panic(err)
}
}
}
@@ -45,6 +47,8 @@ func ready(cfg *config.Config) func(http.ResponseWriter, *http.Request) {
// TODO(tboerger): check if services are up and running
io.WriteString(w, http.StatusText(http.StatusOK))
if _, err := io.WriteString(w, http.StatusText(http.StatusOK)); err != nil {
panic(err)
}
}
}
+3 -1
View File
@@ -46,7 +46,9 @@ func Server(opts ...Option) (http.Service, error) {
handle = svc.NewTracing(handle)
}
micro.RegisterHandler(service.Server(), handle)
if err := micro.RegisterHandler(service.Server(), handle); err != nil {
return http.Service{}, err
}
service.Init()
return service, nil