From 4cb06a5e12e6d700aae08945584c1d3d8c0a0b6f Mon Sep 17 00:00:00 2001 From: mahesh bhatiya Date: Wed, 2 Jul 2025 01:08:59 +0530 Subject: [PATCH 1/2] fix(cli): remove redundant newlines in fmt.Println for help output --- cmd/root.go | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/cmd/root.go b/cmd/root.go index f1d38b5..bd56a52 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -385,9 +385,14 @@ func registerUserCmds() { } func customHelpFunc(cmd *cobra.Command, args []string) { - fmt.Println("\nStackRoost CLI - manage your Linux servers with ease\n") - fmt.Println("Usage:\n stackroost [command]\n") - fmt.Println("Available Commands:") +fmt.Println() +fmt.Println("StackRoost CLI - manage your Linux servers with ease") +fmt.Println() +fmt.Println("Usage:") +fmt.Println(" stackroost [command]") +fmt.Println() +fmt.Println("Available Commands:") + group := map[string][]*cobra.Command{} From e524e8ce4b11850d1b213a6a9aeb53a4a97e15e0 Mon Sep 17 00:00:00 2001 From: mahesh bhatiya Date: Wed, 2 Jul 2025 01:15:31 +0530 Subject: [PATCH 2/2] fix(cli): remove redundant newlines in fmt.Println for help output --- cmd/root.go | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/cmd/root.go b/cmd/root.go index bd56a52..11619dc 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -423,11 +423,13 @@ fmt.Println("Available Commands:") } for title, commands := range group { - fmt.Printf("\n%s\n", title) - for _, c := range commands { - fmt.Printf(" %-22s %s\n", c.Use, c.Short) - } + fmt.Printf("\n%s\n", title) + for _, c := range commands { + fmt.Printf(" %-22s %s\n", c.Use, c.Short) } +} + +fmt.Println() +fmt.Println("Use \"stackroost [command] --help\" for more information about a command.") - fmt.Println("\nUse \"stackroost [command] --help\" for more information about a command.\n") } \ No newline at end of file