From e75e7bd8aefdbcd771769b4cd404560c060de147 Mon Sep 17 00:00:00 2001 From: acoshift Date: Mon, 30 Jul 2018 21:29:57 +0700 Subject: [PATCH] add app.TLS --- app.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app.go b/app.go index 09d4dd1..2a1cfb5 100644 --- a/app.go +++ b/app.go @@ -177,6 +177,12 @@ func (app *App) ListenAndServe() error { return app.listenAndServe() } +// TLS sets cert and key file +func (app *App) TLS(certFile, keyFile string) *App { + app.certFile, app.keyFile = certFile, keyFile + return app +} + // ListenAndServeTLS starts web server in tls mode func (app *App) ListenAndServeTLS(certFile, keyFile string) error { if app.gracefulShutdown != nil {