1
0
Fork 0

Deleted no more needed code for closing of a guestbook DB inside a Handlers struct.

This commit is contained in:
Alexander Andreev 2023-05-22 03:24:03 +04:00
parent e856a4b930
commit 1b61434623
Signed by: Arav
GPG Key ID: D22A817D95815393
2 changed files with 0 additions and 5 deletions

View File

@ -66,7 +66,6 @@ func main() {
defer mindflowDB.Close()
hand := http.NewHandlers(*captchaExpiry, *guestbookOwner, *guestbookPageSize, guestbookDB, mindflowDB)
defer hand.CloseDB()
srv := http.NewHttpServer()

View File

@ -34,10 +34,6 @@ func NewHandlers(captchaExpire time.Duration, gbOwner string, gbPageSize int64,
guestbookPageSize: gbPageSize}
}
func (h *Handlers) CloseDB() {
h.guestbookDB.Close()
}
func (h *Handlers) Index(w http.ResponseWriter, r *http.Request) {
web.Index("", w)
}