From 7cbd49375a8429847750d060bceb4e090dfe341f Mon Sep 17 00:00:00 2001 From: ALX99 <46844683+ALX99@users.noreply.github.com> Date: Fri, 23 Aug 2024 22:40:37 +0900 Subject: [PATCH] fix: shadowing original error This fixes shadowing the original error so that the original error is propagated upwards --- cli/flags.go | 1 - 1 file changed, 1 deletion(-) diff --git a/cli/flags.go b/cli/flags.go index ee8bdd4..872f5f9 100644 --- a/cli/flags.go +++ b/cli/flags.go @@ -56,7 +56,6 @@ func Init() (ret *Flags, err error) { // takes input from stdin if it exists, otherwise takes input from args (the last argument) if hasStdin { if message, err = readStdin(); err != nil { - err = errors.New("error: could not read from stdin") return } } else if len(args) > 0 {