From 6916834dec86e761a3091c9628cbff9b6c389867 Mon Sep 17 00:00:00 2001 From: ale <ale@incal.net> Date: Mon, 29 Oct 2018 11:03:54 +0000 Subject: [PATCH] Fix two lint warnings --- serverutil/http.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/serverutil/http.go b/serverutil/http.go index 3232949..09cc9bb 100644 --- a/serverutil/http.go +++ b/serverutil/http.go @@ -115,8 +115,9 @@ func Serve(h http.Handler, config *ServerConfig, addr string) error { signal.Notify(sigCh, syscall.SIGINT, syscall.SIGTERM) - // Notify systemd that we are ready to serve. - daemon.SdNotify(false, "READY=1") + // Notify systemd that we are ready to serve. This call is + // allowed to fail (in case there is no systemd). + daemon.SdNotify(false, "READY=1") // nolint err = srv.Serve(l) if err != http.ErrServerClosed { @@ -132,7 +133,7 @@ func defaultHandler(h http.Handler) http.Handler { // Add an endpoint for HTTP health checking probes. root.Handle("/health", http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) { - io.WriteString(w, "OK") + io.WriteString(w, "OK") // nolint })) // Add an endpoint to serve Prometheus metrics. -- GitLab