From 59ee54d49a284a1aff4abdbe5f9967303275e43c Mon Sep 17 00:00:00 2001
From: Christian Pointner <equinox@helsinki.at>
Date: Sat, 16 Jun 2018 15:02:44 +0200
Subject: [PATCH] fix build for go1.10

---
 .gitlab-ci.yml   |  2 +-
 cmd/tank/main.go | 16 ++++++++++------
 2 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 039561a..a8bc38e 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,4 +1,4 @@
-image: golang:latest
+image: golang:1.10
 
 variables:
   REPO_NAME: gitlab.servus.at/autoradio/tank
diff --git a/cmd/tank/main.go b/cmd/tank/main.go
index 50b79b9..72226d4 100644
--- a/cmd/tank/main.go
+++ b/cmd/tank/main.go
@@ -66,15 +66,19 @@ func cmdInit(c *cli.Context) error {
 
 func openStoreAndImporter(c *cli.Context) (st *store.Store, im *importer.Importer, err error) {
 	// TODO: hardcoded values
-	cfg := &store.Config{}
-	cfg.BasePath = "/tmp"
-	cfg.DB.Type = "sqlite"
-	cfg.DB.Connection = ":memory:"
-	if st, err = store.NewStore(cfg); err != nil {
+	sCfg := &store.Config{}
+	sCfg.BasePath = "/tmp"
+	sCfg.DB.Type = "sqlite"
+	sCfg.DB.Connection = ":memory:"
+	if st, err = store.NewStore(sCfg); err != nil {
 		return nil, nil, err
 	}
 
-	if im, err = importer.NewImporter(&importer.Config{"/tmp", 0}, st, infoLog, errLog, dbgLog); err != nil { // TODO: hardcoded value
+	// TODO: hardcoded values
+	iCfg := &importer.Config{}
+	iCfg.TempPath = "/tmp"
+	iCfg.Workers = 0
+	if im, err = importer.NewImporter(iCfg, st, infoLog, errLog, dbgLog); err != nil {
 		return nil, nil, err
 	}
 
-- 
GitLab