open flag
This commit is contained in:
parent
e79cb9e6e0
commit
20a0a6724a
3 changed files with 16 additions and 5 deletions
|
|
@ -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}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue