func (router *Router) ShutdownHTTPS() error {
	if router.httpsServer == nil {
		return nil
	}
	timer := router.config.ShutdownTimeout
	ctx, cancel := context.WithTimeout(context.TODO(), timer)
	defer cancel()
	err := router.httpsServer.Shutdown(ctx)
	if err != nil && err != http.ErrServerClosed {
		LOGHANDLER.Error(err)
	}
	return err
}
ShutdownHTTPS gracefully shuts down HTTPS server
package webgo
import (
	"context"
	"crypto/tls"
	"net/http"
)
var supportedHTTPMethods = []string{
	http.MethodOptions,
	http.MethodHead,
	http.MethodGet,
	http.MethodPost,
	http.MethodPut,
	http.MethodPatch,
	http.MethodDelete,
}
type ctxkey string
const wgoCtxKey = ctxkey("webgocontext")
type ContextPayload struct {
	Route *Route
	Err   error
	path  string
}
func (cp *ContextPayload) Params() map[string]string {
	return cp.Route.params(cp.path)
}
func (cp *ContextPayload) reset() {
	cp.Route = nil
	cp.path = ""
	cp.Err = nil
}
func (cp *ContextPayload) SetError(err error) {
	cp.Err = err
}
func (cp *ContextPayload) Error() error {
	return cp.Err
}
func Context(r *http.Request) *ContextPayload {
	return r.Context().Value(wgoCtxKey).(*ContextPayload)
}
func SetError(r *http.Request, err error) {
	ctx := Context(r)
	ctx.SetError(err)
}
func GetError(r *http.Request) error {
	return Context(r).Error()
}
func ResponseStatus(rw http.ResponseWriter) int {
	crw, ok := rw.(*customResponseWriter)
	if !ok {
		return http.StatusOK
	}
	return crw.statusCode
}
func (router *Router) StartHTTPS() {
	cfg := router.config
	if cfg.CertFile == "" {
		LOGHANDLER.Fatal("No certificate provided for HTTPS")
	}
	if cfg.KeyFile == "" {
		LOGHANDLER.Fatal("No key file provided for HTTPS")
	}
	host := cfg.Host
	if len(cfg.HTTPSPort) > 0 {
		host += ":" + cfg.HTTPSPort
	}
	router.httpsServer = &http.Server{
		Addr:         host,
		Handler:      router,
		ReadTimeout:  cfg.ReadTimeout,
		WriteTimeout: cfg.WriteTimeout,
		TLSConfig: &tls.Config{
			InsecureSkipVerify: cfg.InsecureSkipVerify,
		},
	}
	LOGHANDLER.Info("HTTPS server, listening on", host)
	err := router.httpsServer.ListenAndServeTLS(cfg.CertFile, cfg.KeyFile)
	if err != nil && err != http.ErrServerClosed {
		LOGHANDLER.Error("HTTPS server exited with error:", err.Error())
	}
}
func (router *Router) Start() {
	cfg := router.config
	host := cfg.Host
	if len(cfg.Port) > 0 {
		host += ":" + cfg.Port
	}
	router.httpServer = &http.Server{
		Addr:         host,
		Handler:      router,
		ReadTimeout:  cfg.ReadTimeout,
		WriteTimeout: cfg.WriteTimeout,
	}
	LOGHANDLER.Info("HTTP server, listening on", host)
	err := router.httpServer.ListenAndServe()
	if err != nil && err != http.ErrServerClosed {
		LOGHANDLER.Error("HTTP server exited with error:", err.Error())
	}
}
func (router *Router) Shutdown() error {
	if router.httpServer == nil {
		return nil
	}
	timer := router.config.ShutdownTimeout
	ctx, cancel := context.WithTimeout(context.TODO(), timer)
	defer cancel()
	err := router.httpServer.Shutdown(ctx)
	if err != nil {
		LOGHANDLER.Error(err)
	}
	return err
}