From 7f964801c202f2238a4a31d02db0f7f73a826c88 Mon Sep 17 00:00:00 2001 From: Suyash Kumar Date: Fri, 9 Nov 2018 00:18:17 -0500 Subject: [PATCH] wrap serve with log.fatal for visible failures (#9) This closes #8 and implements a minor cleanup. --- main.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/main.go b/main.go index f46b919..d8020bf 100644 --- a/main.go +++ b/main.go @@ -105,8 +105,10 @@ func main() { TLSConfig: m.TLSConfig(), } s.Handler = mux - s.ListenAndServeTLS("", "") - } else { - log.Fatal(http.ListenAndServeTLS(*fromURL, *certFile, *keyFile, mux)) + log.Fatal(s.ListenAndServeTLS("", "")) } + + // Domain is not provided, serve using provided/generated certificate files + log.Fatal(http.ListenAndServeTLS(*fromURL, *certFile, *keyFile, mux)) + }