From e73944fa1371f43ec04f909b2a980dc0d0d32750 Mon Sep 17 00:00:00 2001 From: Richard Hagen Date: Tue, 4 Jun 2024 10:36:54 +0200 Subject: [PATCH] update golangci-lint, goreleaser, remove shorthand flag, add comment about local file and file:// (#96) --- cmd/validateRadixConfig.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/cmd/validateRadixConfig.go b/cmd/validateRadixConfig.go index e974ea8..edffe0f 100644 --- a/cmd/validateRadixConfig.go +++ b/cmd/validateRadixConfig.go @@ -95,16 +95,16 @@ var validateRadixConfigCmd = &cobra.Command{ validationErrors = append(validationErrors, err) } - if len(validationErrors) > 0 { - for _, err := range validationErrors { - fmt.Fprintf(os.Stderr, " - %s\n", err) - } - - fmt.Fprintln(os.Stderr, "RadixConfig is invalid") - os.Exit(2) + if len(validationErrors) == 0 { + fmt.Fprintln(os.Stderr, "RadixConfig is valid") + return } - fmt.Fprintln(os.Stderr, "RadixConfig is valid") + fmt.Fprintln(os.Stderr, "RadixConfig is invalid") + for _, err := range validationErrors { + fmt.Fprintf(os.Stderr, " - %s\n", err) + } + os.Exit(2) }, }