From 344c6526a8d6f490fc7628ddc7d2dd06ed1a07c1 Mon Sep 17 00:00:00 2001 From: JP Appel Date: Tue, 22 Jul 2025 15:41:03 -0400 Subject: Separate program entry point from commands --- cmd/help.go | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 cmd/help.go (limited to 'cmd/help.go') diff --git a/cmd/help.go b/cmd/help.go new file mode 100644 index 0000000..b3844ac --- /dev/null +++ b/cmd/help.go @@ -0,0 +1,29 @@ +package cmd + +import ( + "fmt" + "os" +) + +var CommandHelp map[string]string + +func PrintHelp() { + fmt.Println("atlas is a note indexing and querying tool") + fmt.Printf("\nUsage:\n %s [global-flags] \n\n", os.Args[0]) + fmt.Println("Commands:") + fmt.Println(" index - build, update, or modify an index") + fmt.Println(" query - search against an index") + fmt.Println(" shell - start a debug shell") + fmt.Println(" server - start an http query server (EXPERIMENTAL)") + fmt.Println(" help - print this help then exit") +} + +func init() { + CommandHelp = make(map[string]string) + CommandHelp["query"] = "" + CommandHelp["index"] = "" + CommandHelp["server"] = "" + CommandHelp["completions"] = "" + CommandHelp["shell"] = "" + CommandHelp["help"] = "" +} -- cgit v1.2.3