aboutsummaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorMatthew Lemon <lemon@matthewlemon.com>2020-07-20 20:23:41 +0100
committerMatthew Lemon <lemon@matthewlemon.com>2020-07-20 20:23:41 +0100
commitc7766d087d6cdd691e60f4b2d317030543209c08 (patch)
tree2fbb285b78d5590e7ca1bce2a0e486bd9569dad3 /cmd
parentccbf44bac566ff312f168e563afb003cf0ee3da3 (diff)
first test passing that puts datamap data into sqlite3
Diffstat (limited to 'cmd')
-rw-r--r--cmd/main.go9
1 files changed, 8 insertions, 1 deletions
diff --git a/cmd/main.go b/cmd/main.go
index dfe24fb..5e77583 100644
--- a/cmd/main.go
+++ b/cmd/main.go
@@ -9,6 +9,8 @@ import (
"log"
"os"
"path/filepath"
+
+ "github.com/yulqen/datamaps-go/pkg/reader"
)
func setUp() (string, error) {
@@ -64,7 +66,7 @@ func main() {
initialFlg := datamapCmd.Bool("initial", false, "This option must be used where no datamap table yet exists.")
if len(os.Args) < 2 {
- fmt.Println("expected 'datamap' or 'setup' subcommand")
+ fmt.Println("Expected 'datamap' or 'setup' subcommand")
os.Exit(1)
}
@@ -77,6 +79,11 @@ func main() {
fmt.Println(" name:", *nameFlg)
fmt.Println(" overwrite:", *overwriteFlg)
fmt.Println(" initial:", *initialFlg)
+ data, err := reader.ReadDML(*importFlg)
+ if err != nil {
+ log.Fatal(err)
+ }
+ fmt.Println(data[3].Key)
case "setup":
setupCmd.Parse(os.Args[2:])
_, err := setUp()