Separate db initialization from store opening
This commit is contained in:
parent
646501d609
commit
b61bae7cd8
5 changed files with 36 additions and 30 deletions
|
|
@ -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{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue