From 5635d2a375a754f8640ecb0d12d56a14b94338e1 Mon Sep 17 00:00:00 2001 From: Arsen Musayelyan Date: Tue, 25 Aug 2020 08:38:17 -0700 Subject: [PATCH] Fix extra whitespace in help screen due to go's automatic concatenation of arguments in fmt.Println() --- pak.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pak.go b/pak.go index d0152a2..e529feb 100644 --- a/pak.go +++ b/pak.go @@ -35,8 +35,8 @@ func printHelpMessage(packageManagerCommand string, useRootBool bool, rootComman fmt.Println("Current package manager is:", packageManagerCommand) if useRootBool { fmt.Println("Using root with:", rootCommand, "\n") } else { fmt.Println("Not using root\n") } fmt.Println("Usage: pak [package]\nExample: pak in hello\n") - fmt.Println("The available commands are:\n", strings.Join(commands, "\n"),"\n") - fmt.Println("The available shortcuts are:\n", strings.Join(shortcuts, "\n"), "\n") + fmt.Println("The available commands are:\n" + strings.Join(commands, "\n"),"\n") + fmt.Println("The available shortcuts are:\n" + strings.Join(shortcuts, "\n"), "\n") fmt.Println("The available flags are:\n--help, -h: Shows this help screen\n--root, -r: Bypass root error") fmt.Println("misc: All", packageManagerCommand, "flags\n") fmt.Println("Writing the whole command is uneccesary, just use enough to differentiate")