From 87938bcc0993c0ba7bc7328b8408aa8b204d5cf9 Mon Sep 17 00:00:00 2001 From: Kevin Wan Date: Wed, 17 Feb 2021 11:08:30 +0800 Subject: [PATCH] fix golint issues in core/cmdline (#467) --- core/cmdline/input.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/cmdline/input.go b/core/cmdline/input.go index 0284d99e..b25a233a 100644 --- a/core/cmdline/input.go +++ b/core/cmdline/input.go @@ -7,11 +7,13 @@ import ( "strings" ) +// EnterToContinue let stdin waiting for an enter key to continue. func EnterToContinue() { fmt.Print("Press 'Enter' to continue...") bufio.NewReader(os.Stdin).ReadBytes('\n') } +// ReadLine shows prompt to stdout and read a line from stdin. func ReadLine(prompt string) string { fmt.Print(prompt) input, _ := bufio.NewReader(os.Stdin).ReadString('\n')