From a3d263dd3aa5e2fa80948bc0a1de2f0e4c57084e Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Mon, 18 Nov 2019 16:38:54 +0100 Subject: [PATCH] cmd/clef: fix staticcheck warnings (#20314) --- cmd/clef/main.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/clef/main.go b/cmd/clef/main.go index 9172b4902..5775a1049 100644 --- a/cmd/clef/main.go +++ b/cmd/clef/main.go @@ -387,7 +387,7 @@ func initialize(c *cli.Context) error { if c.GlobalBool(stdiouiFlag.Name) { logOutput = os.Stderr // If using the stdioui, we can't do the 'confirm'-flow - fmt.Fprintf(logOutput, legalWarning) + fmt.Fprint(logOutput, legalWarning) } else { if !confirm(legalWarning) { return fmt.Errorf("aborted by user") @@ -579,7 +579,7 @@ func signer(c *cli.Context) error { }, }) - abortChan := make(chan os.Signal) + abortChan := make(chan os.Signal, 1) signal.Notify(abortChan, os.Interrupt) sig := <-abortChan @@ -694,7 +694,7 @@ func checkFile(filename string) error { // confirm displays a text and asks for user confirmation func confirm(text string) bool { - fmt.Printf(text) + fmt.Print(text) fmt.Printf("\nEnter 'ok' to proceed:\n> ") text, err := bufio.NewReader(os.Stdin).ReadString('\n')