func (app *App) Listen(addr string, config ...ListenConfig) error
type ListenConfig struct {
ListenerNetwork string
CertFile string
KeyFile string
ClientCertFile string
DisableStartupMessage bool
EnablePrefork bool
GracefulContext context.Context
GracefulTimeout time.Duration
TLSConfigFunc func(tlsConfig *tls.Config)
ListenerAddrFunc func(addr net.Addr)
}
I think this way is more useful than creating more methods.
Reference: https://github.com/labstack/echo/blob/v5_alpha/server.go