diff options
author | Matthew Lemon <lemon@matthewlemon.com> | 2020-07-22 21:01:54 +0100 |
---|---|---|
committer | Matthew Lemon <lemon@matthewlemon.com> | 2020-07-22 21:01:54 +0100 |
commit | d7d4d0a0476f98d1b0b4c5c454b6d1048a82bdad (patch) | |
tree | 11aaba3bab132e3f7d13f73c61d8b14739794f50 /cmd/dm/main.go | |
parent | c3d4c6bb51a3d7b89e0fcbb69230db423577ae17 (diff) |
more major surgery
Diffstat (limited to '')
-rw-r--r-- | cmd/datamaps/main.go (renamed from cmd/dm/main.go) | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/cmd/dm/main.go b/cmd/datamaps/main.go index de79441..c2a1d71 100644 --- a/cmd/dm/main.go +++ b/cmd/datamaps/main.go @@ -11,7 +11,7 @@ import ( "os" "path/filepath" - "github.com/yulqen/datamaps-go/pkg/reader" + "github.com/yulqen/datamaps-go/pkg/datamaps" ) const ( @@ -43,7 +43,7 @@ func setUp() (string, error) { return "", err } log.Printf("Creating database file at %s\n", db_path) - _, err := reader.SetupDB(db_path) + _, err := datamaps.SetupDB(db_path) if err != nil { return "", err } @@ -73,13 +73,13 @@ func main() { os.Exit(1) } - opts := reader.Opts{ - DBPath: "", - ImportPath: *importFlg, - Name: *nameFlg, - Overwrite: *overwriteFlg, - Initial: *initialFlg, - DMData: nil, + opts := datamaps.Options{ + DBPath: "", + DMPath: *importFlg, + DMName: *nameFlg, + DMOverwrite: *overwriteFlg, + DMInitial: *initialFlg, + DMData: nil, } switch os.Args[1] { @@ -118,14 +118,14 @@ func main() { os.Exit(1) } // Here we actually read the data from the file - data, err := reader.ReadDML(opts.ImportPath) + data, err := datamaps.ReadDML(opts.ImportPath) if err != nil { log.Fatal(err) } opts.DMData = data opts.DBPath = filepath.Join(config_path, db_name) - err = reader.DatamapToDB(opts) + err = datamaps.DatamapToDB(opts) if err != nil { log.Fatal(err) } |