Separate db initialization from store opening

This commit is contained in:
bronku 2025-03-21 18:50:26 +01:00
parent 646501d609
commit b61bae7cd8
5 changed files with 36 additions and 30 deletions

View file

@ -14,6 +14,12 @@ type handler struct {
s *store
}
func (h *handler) close() {
if h.s != nil {
h.s.close()
}
}
func (h *handler) form(w http.ResponseWriter, r *http.Request) {
url := strings.Split(r.URL.String(), "/")
o := order{