Fixes RunTLS() implementation

- thanks @Dal-Papa
This commit is contained in:
Manu Mtz-Almeida 2015-05-28 03:02:53 +02:00
parent 34411c896f
commit b96f68ce7b

4
gin.go
View File

@ -171,11 +171,11 @@ func (engine *Engine) Run(addr string) (err error) {
return return
} }
func (engine *Engine) RunTLS(addr string, cert string, key string) (err error) { func (engine *Engine) RunTLS(addr string, certFile string, keyFile string) (err error) {
debugPrint("Listening and serving HTTPS on %s\n", addr) debugPrint("Listening and serving HTTPS on %s\n", addr)
defer func() { debugPrintError(err) }() defer func() { debugPrintError(err) }()
err = http.ListenAndServe(addr, engine) err = http.ListenAndServeTLS(addr, certFile, keyFile, engine)
return return
} }