From b21724251439bb7f8eaa47c61e4bc7212170ffbc Mon Sep 17 00:00:00 2001 From: perp Date: Tue, 9 Jul 2024 19:39:40 +0100 Subject: [PATCH] Fixed verbose logging --- v1/cmd/blink/main.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/v1/cmd/blink/main.go b/v1/cmd/blink/main.go index 34f7c18..cc73121 100644 --- a/v1/cmd/blink/main.go +++ b/v1/cmd/blink/main.go @@ -108,7 +108,6 @@ var rootCmd = &cobra.Command{ // Check error if result.Error != nil { - // Verbose enabled if verbose { log.Err(result.Error).Msg("") } @@ -118,8 +117,10 @@ var rootCmd = &cobra.Command{ // Verify check if verify { if !dns.Verify(result.Subdomain) { - log.Err(errors.New(fmt.Sprintf("Could not verify %s", result.Subdomain))). - Msg("") + if verbose { + log.Err(errors.New(fmt.Sprintf("Could not verify %s", result.Subdomain))). + Msg("") + } return } }