From aa141d4ae24e61671b4b418f97fcecba7302084c Mon Sep 17 00:00:00 2001 From: Mario Di Miceli Date: Fri, 23 Aug 2024 18:05:41 +0200 Subject: [PATCH] fix golangci-lint errors --- application/logger.go | 5 ++++- terraform/executor.go | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/application/logger.go b/application/logger.go index 34208baa8..10e2e6106 100644 --- a/application/logger.go +++ b/application/logger.go @@ -76,7 +76,10 @@ func (l *Logger) Prompt(message string) bool { l.newline = true var proceed string - fmt.Fscanln(l.reader, &proceed) + _, err := fmt.Fscanln(l.reader, &proceed) + if err != nil { + return false + } proceed = strings.ToLower(proceed) if proceed == "yes" || proceed == "y" { diff --git a/terraform/executor.go b/terraform/executor.go index a21ba39a4..b75f6c800 100644 --- a/terraform/executor.go +++ b/terraform/executor.go @@ -156,7 +156,7 @@ func (e Executor) runTFCommandWithEnvs(args, envs []string) error { if e.debug { return err } - return fmt.Errorf(redactedError) + return fmt.Errorf("%s", redactedError) } return nil @@ -224,7 +224,7 @@ func (e Executor) Validate(credentials map[string]string) error { if e.debug { return err } - return fmt.Errorf(redactedError) + return fmt.Errorf("%s", redactedError) } return nil