aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/db/setup.go
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--pkg/db/setup.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/pkg/db/setup.go b/pkg/db/setup.go
index ef53cf6..d0c0064 100644
--- a/pkg/db/setup.go
+++ b/pkg/db/setup.go
@@ -49,7 +49,12 @@ func SetupDB(path string) (*sql.DB, error) {
}
//DatamapToDB takes a slice of DatamapLine and writes it to a sqlite3 db file.
-func DatamapToDB(data []reader.DatamapLine, db *sql.DB, dm_name string) error {
+func DatamapToDB(data []reader.DatamapLine, dm_name string, dm_path string) error {
+ log.Printf("Importing Datamap")
+ db, err := SetupDB("/home/lemon/.config/datamaps-go/datamaps.db")
+ if err != nil {
+ return err
+ }
tx, err := db.Begin()
if err != nil {
return err