diff options
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] { |