aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/datamaps/main.go
diff options
context:
space:
mode:
authorMatthew Lemon <lemon@matthewlemon.com>2020-11-29 15:52:49 +0000
committerMatthew Lemon <lemon@matthewlemon.com>2020-11-29 15:52:49 +0000
commit19108ae6f38c18d14c22759be43af7368e7c2b89 (patch)
tree2cc1ebf0d9fd05e610f62301172469f3506cc6b4 /cmd/datamaps/main.go
parent82e603df33359adc48caa5bc56e23084ac15abdf (diff)
started working on help command
Diffstat (limited to 'cmd/datamaps/main.go')
-rw-r--r--cmd/datamaps/main.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/cmd/datamaps/main.go b/cmd/datamaps/main.go
index dc87f4f..66f78a0 100644
--- a/cmd/datamaps/main.go
+++ b/cmd/datamaps/main.go
@@ -12,12 +12,15 @@ import (
)
func main() {
+ opts := datamaps.ParseOptions()
+ if opts.Command == "help" {
+ os.Stdout.WriteString(datamaps.Usage)
+ os.Exit(0)
+ }
dbpc := datamaps.NewDBPathChecker(os.UserConfigDir)
if !dbpc.Check() {
datamaps.SetUp()
}
- opts := datamaps.ParseOptions()
-
switch opts.Command {
case "import":
if err := datamaps.ImportToDB(opts); err != nil {