From 1c4504982a058a3a6908609875c27b3883509f1d Mon Sep 17 00:00:00 2001 From: KenyC Date: Thu, 31 Oct 2024 17:09:10 +0100 Subject: [PATCH] Replaced complex condition with already defined serveTLS --- cmd/serve/serve.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/serve/serve.go b/cmd/serve/serve.go index 335a47b..bc5a731 100644 --- a/cmd/serve/serve.go +++ b/cmd/serve/serve.go @@ -92,7 +92,7 @@ func (c *command) Run(ctx context.Context) error { hostname := "localhost" // default hostname protocol := "http" - if *c.tlsCertPath != "" && *c.tlsKeyPath != "" { + if serveTLS { protocol = "https" } baseURL := fmt.Sprintf("%s://%s:%d", protocol, hostname, *c.port)