From 3b956ef3a81de3228afb76bc5f56e1db5f797e39 Mon Sep 17 00:00:00 2001 From: Fenny <25108519+Fenny@users.noreply.github.com> Date: Wed, 16 Dec 2020 03:03:15 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9C=8F=20fix=20typo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: kiyon --- app.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app.go b/app.go index c468810798..c6807ec129 100644 --- a/app.go +++ b/app.go @@ -571,11 +571,11 @@ func (app *App) Listen(addr string) error { // ListenTLS serves HTTPs requests from the given addr. // certFile and keyFile are the paths to TLS certificate and key file. -// app.Listen(":8080", "./cert.pem", "./cert.key") -// app.Listen(":8080", "./cert.pem", "./cert.key") +// app.ListenTLS(":8080", "./cert.pem", "./cert.key") +// app.ListenTLS(":8080", "./cert.pem", "./cert.key") func (app *App) ListenTLS(addr, certFile, keyFile string) error { // Check for valid cert/key path - if len(certFile) == 0 && len(keyFile) == 0 { + if len(certFile) == 0 || len(keyFile) == 0 { return errors.New("tls: provide a valid cert or key path") } // Prefork is supported