refactor(log): replace panics with log fatal or log panic functions (#1723)

Signed-off-by: Laurentiu Niculae <niculae.laurentiu1@gmail.com>
This commit is contained in:
LaurentiuNiculae
2023-11-24 10:38:36 +02:00
committed by GitHub
parent 83f287d1f6
commit 92837c2bcb
22 changed files with 969 additions and 302 deletions
+3 -3
View File
@@ -37,7 +37,7 @@ func NewConfigCommand() *cobra.Command {
RunE: func(cmd *cobra.Command, args []string) error {
home, err := os.UserHomeDir()
if err != nil {
panic(err)
return err
}
configPath := path.Join(home, "/.zot")
@@ -112,7 +112,7 @@ func NewConfigAddCommand() *cobra.Command {
RunE: func(cmd *cobra.Command, args []string) error {
home, err := os.UserHomeDir()
if err != nil {
panic(err)
return err
}
configPath := path.Join(home, "/.zot")
@@ -142,7 +142,7 @@ func NewConfigRemoveCommand() *cobra.Command {
RunE: func(cmd *cobra.Command, args []string) error {
home, err := os.UserHomeDir()
if err != nil {
panic(err)
return err
}
configPath := path.Join(home, "/.zot")