resolve linter issues

This commit is contained in:
David Christofas
2021-02-24 14:48:22 +01:00
parent 3328f9acb7
commit cc417c6ee8
8 changed files with 18 additions and 34 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)
}
}
}
+4 -2
View File
@@ -40,7 +40,7 @@ func Server(opts ...Option) (http.Service, error) {
os.Exit(1)
}
tlsConfig = &tls.Config{Certificates: []tls.Certificate{cer}}
tlsConfig = &tls.Config{MinVersion: tls.VersionTLS12, Certificates: []tls.Certificate{cer}}
}
service := http.NewService(
@@ -79,7 +79,9 @@ func Server(opts ...Option) (http.Service, error) {
handle = svc.NewLogging(handle, options.Logger)
}
micro.RegisterHandler(service.Server(), handle)
if err := micro.RegisterHandler(service.Server(), handle); err != nil {
return http.Service{}, err
}
service.Init()
return service, nil