From 19108ae6f38c18d14c22759be43af7368e7c2b89 Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Sun, 29 Nov 2020 15:52:49 +0000 Subject: started working on help command --- cmd/datamaps/main.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'cmd/datamaps/main.go') 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 { -- cgit v1.2.3