From 72ccd60490fa3524b422ab282408339cb2422fd6 Mon Sep 17 00:00:00 2001 From: Naitik Shah Date: Wed, 18 Sep 2013 17:58:04 -0700 Subject: [PATCH] fix bugs pointed out by go vet --- grace.go | 1 - gracehttp/testserver/testserver.go | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/grace.go b/grace.go index 88b1fe4..a7394aa 100644 --- a/grace.go +++ b/grace.go @@ -161,7 +161,6 @@ func Wait(listeners []Listener) (err error) { } } } - panic("not reached") } // Try to inherit listeners from the parent process. diff --git a/gracehttp/testserver/testserver.go b/gracehttp/testserver/testserver.go index 8268621..7ce16bf 100644 --- a/gracehttp/testserver/testserver.go +++ b/gracehttp/testserver/testserver.go @@ -31,7 +31,7 @@ func wait(wg *sync.WaitGroup, url string) { defer res.Body.Close() var r response if err := json.NewDecoder(res.Body).Decode(&r); err != nil { - log.Fatal("Error decoding json: %s", err) + log.Fatalf("Error decoding json: %s", err) } if r.Pid == os.Getpid() { return @@ -54,7 +54,7 @@ func wait(wg *sync.WaitGroup, url string) { func httpsServer(addr string) *http.Server { cert, err := tls.X509KeyPair(localhostCert, localhostKey) if err != nil { - log.Fatal("error loading cert: %v", err) + log.Fatalf("error loading cert: %v", err) } return &http.Server{ Addr: addr,