diff options
author | Matthew Lemon <lemon@matthewlemon.com> | 2020-07-23 16:45:34 +0100 |
---|---|---|
committer | Matthew Lemon <lemon@matthewlemon.com> | 2020-07-23 16:45:34 +0100 |
commit | 1cd5f295939e25e6af54bf69ae9f551f23c57f23 (patch) | |
tree | 9a1c255eafef10b893b06781e8f99ed3d649bbf9 /cmd/datamaps | |
parent | a3f1445eb58fb383f9012564108f948f2051869f (diff) |
progress on parsing variables - can do again datamap import and setup
Diffstat (limited to '')
-rw-r--r-- | cmd/datamaps/main.go | 21 |
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] { |