From 5717c8255a134db745f921ecd3b8dd091500738b Mon Sep 17 00:00:00 2001 From: Calvin Figuereo-Supraner Date: Thu, 15 Feb 2024 02:02:54 -0800 Subject: [PATCH] Use result of fmt.Errorf call (#1668) --- hscontrol/tailsql.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hscontrol/tailsql.go b/hscontrol/tailsql.go index 973915d..fc1e6a1 100644 --- a/hscontrol/tailsql.go +++ b/hscontrol/tailsql.go @@ -70,7 +70,7 @@ func runTailSQLService(ctx context.Context, logf logger.Logf, stateDir, dbPath s // When serving TLS, add a redirect from HTTP on port 80 to HTTPS on 443. certDomains := tsNode.CertDomains() if len(certDomains) == 0 { - fmt.Errorf("no cert domains available for HTTPS") + return fmt.Errorf("no cert domains available for HTTPS") } base := "https://" + certDomains[0] go http.Serve(lst, http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {