🎨 Error handling
Redid error handling.
This commit is contained in:
parent
8e2bbf8c57
commit
d33765751c
@ -1,9 +1,9 @@
|
||||
package alert
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/fatih/color"
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
"git.tcp.direct/perp/shogo/internal/utils"
|
||||
@ -19,7 +19,7 @@ var AlertCmd = &cobra.Command{
|
||||
Run: func(cmd *cobra.Command, _ []string) {
|
||||
utils.CheckColor()
|
||||
if err := cmd.Help(); err != nil {
|
||||
color.Red("Error: %s", err.Error())
|
||||
fmt.Printf("%s: %s\n", utils.Red("Error"), err.Error())
|
||||
os.Exit(1)
|
||||
}
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user