diff --git a/main.go b/main.go index 09ce032..205dfb4 100644 --- a/main.go +++ b/main.go @@ -40,6 +40,7 @@ var ( ) // TODO: Embed food.ddl and create DB if no exists +// TODO: Add averages to graphs (ie. R2) https://stackoverflow.com/questions/60622195/how-to-draw-a-linear-regression-line-in-chart-js func main() { dbpath := flag.String("db", "food.db", "Path to the database file") flag.Parse() @@ -50,6 +51,7 @@ func main() { Error.Printf("%++v", err) os.Exit(1) } + defer db.Close() settingsService = &SettingsService{db: &db} err = settingsService.LoadSettings()