aboutsummaryrefslogtreecommitdiffstats
path: root/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'main.go')
-rw-r--r--main.go3
1 files changed, 0 insertions, 3 deletions
diff --git a/main.go b/main.go
index c4e5cd9..6080b69 100644
--- a/main.go
+++ b/main.go
@@ -19,7 +19,6 @@ type handler func(DataStore, http.ResponseWriter, *http.Request)
type App struct {
DataStore
- DB *sql.DB
Config *Config
CookieHandler *securecookie.SecureCookie
Template *template.Template
@@ -33,7 +32,6 @@ func New() *App {
if err = db.Ping(); err != nil {
log.Fatal(err)
}
- app.DB = db
app.DataStore = &SqlStore{db}
hashKey, err := hex.DecodeString(config.HashKey)
blockKey, err := hex.DecodeString(config.BlockKey)
@@ -85,7 +83,6 @@ func (app *App) InitWebServer() *http.Server {
func main() {
log.SetFlags(log.LstdFlags | log.Lshortfile)
app := New()
- defer app.DB.Close()
apiServer := app.InitApiServer()
webServer := app.InitWebServer()