aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/dm/main.go
diff options
context:
space:
mode:
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)
}