aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/datamaps
diff options
context:
space:
mode:
authorMatthew Lemon <lemon@matthewlemon.com>2020-07-23 16:45:34 +0100
committerMatthew Lemon <lemon@matthewlemon.com>2020-07-23 16:45:34 +0100
commit1cd5f295939e25e6af54bf69ae9f551f23c57f23 (patch)
tree9a1c255eafef10b893b06781e8f99ed3d649bbf9 /cmd/datamaps
parenta3f1445eb58fb383f9012564108f948f2051869f (diff)
progress on parsing variables - can do again datamap import and setup
Diffstat (limited to '')
-rw-r--r--cmd/datamaps/main.go21
1 files changed, 20 insertions, 1 deletions
diff --git a/cmd/datamaps/main.go b/cmd/datamaps/main.go
index 82a655b..f37f537 100644
--- a/cmd/datamaps/main.go
+++ b/cmd/datamaps/main.go
@@ -52,7 +52,26 @@ func setUp() (string, error) {
func main() {
- _ = datamaps.ParseOptions()
+ opts := datamaps.ParseOptions()
+
+ switch opts.Command {
+ case "datamap":
+ data, err := datamaps.ReadDML(opts.DMPath)
+ if err != nil {
+ log.Fatal(err)
+ }
+ opts.DMData = data
+
+ err = datamaps.DatamapToDB(opts)
+ if err != nil {
+ log.Fatal(err)
+ }
+ case "setup":
+ _, err := setUp()
+ if err != nil {
+ log.Fatal(err)
+ }
+ }
// switch os.Args[1] {