mirror of
https://github.com/nkanaev/yarr.git
synced 2025-09-13 09:55:36 +00:00
open flag
This commit is contained in:
@@ -37,6 +37,14 @@ func New(db *storage.Storage, logger *log.Logger, addr string) *Handler {
|
||||
}
|
||||
}
|
||||
|
||||
func (h *Handler) GetAddr() string {
|
||||
proto := "http"
|
||||
if (h.CertFile != "" && h.KeyFile != "") {
|
||||
proto = "https"
|
||||
}
|
||||
return proto + "://" + h.Addr
|
||||
}
|
||||
|
||||
func (h *Handler) Start() {
|
||||
h.startJobs()
|
||||
s := &http.Server{Addr: h.Addr, Handler: h}
|
||||
|
Reference in New Issue
Block a user