From 823f6787577f389c4545b0fe957864f47fc0b28e Mon Sep 17 00:00:00 2001 From: endigma Date: Sat, 30 Jan 2021 15:17:29 -0400 Subject: [PATCH] made cli use $0 as reference for helptext --- main.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/main.go b/main.go index feb47e5..17252e8 100644 --- a/main.go +++ b/main.go @@ -55,7 +55,7 @@ func main() { case "info": api.InitAPI() if len(os.Args) <= 2 { - fmt.Println("Usage: r2go info ") + fmt.Printf("Usage: %s info \n", os.Args[0]) } else { var selectedmod api.Mod = api.GetModData(os.Args[2]) color.Cyan("Mod Info: %s", os.Args[2]) @@ -123,8 +123,9 @@ func main() { case "filter": fmt.Println(tools.ExposeModString(os.Args[2])) case "version", "ver", "v": - color.Magenta("> r2go", version) - fmt.Println(" > github.com/endigma442") + color.Magenta("> r2go") + fmt.Println(">", version) + fmt.Println("> git.cya.cx/endigma/r2mod-go") case "search", "s", "find": api.InitAPI() @@ -138,6 +139,6 @@ func main() { fmt.Println(" -", mod.Target) } default: - fmt.Println("Unknown command, use 'r2go help' for a list of commands.") + fmt.Printf("Unknown command, use '%s help' for a list of commands.\n", os.Args[0]) } }